Hi,
I just fiddling with the GetBundle GUI. While doing this I thought
that it would be nice to have a asynchronous window created via
"$DIALOG" window create ...
which I can modify while runtime.
A simple example:
Supposing you have a NIB which shows names and last names of persons
in a table, and you want to select one person in order to display more
information. But I want to be able to display either all male persons
or all female persons, and if I selected an item the window shouldn't
be closed.
What I did is to set up such a NIB with a pop-down menu 'Choose
Gender'. Fine.
But how can I notify the running script in the background that I
changed that pop-down menu?
I didn't find a way to do this. That's why I introduced a new method
to '"$DIALOG" window' named 'getparams'.
This method is very simple. It write the current NSDictionary
'parameters' of the current nibController to the standard output.
Nothing else.
But then I was able to ask the async window: Are there any changes? If
so, then I changed the content of the parameters accordingly and
updated the window's parameters.
Here is a screencast to illustrate this example:
http://www.bibiko.de/TM_intact_async_window.mov (1.7MB)
By using the new method 'getparams' it opens ways to do more useful
things, I believe.
You can hide/show items easier, change the content of data cells,
change the title of buttons according to the status of radio buttons
or checkboxes, etc.....
Here is the code for "$DIALOG2" > window.mm
...
else if([command isEqualToString:@"getparams"])
{
if([proxy numberOfArguments] < 4)
ErrorAndReturn(@"no window token given");
NSString* token = [proxy argumentAtIndex:3];
TMDNibController* nibController = [TMDNibController
controllerForToken:token];
if(nibController)
{
id params = [[nibController parameters] mutableCopy];
[params removeObjectForKey:@"controller"];
NSString* error = nil;
if(NSData* data = [NSPropertyListSerialization
dataFromPropertyList:params format:NSPropertyListXMLFormat_v1_0
errorDescription:&error])
{
NSString* outpl = [[[NSString alloc] initWithData:data
encoding:NSUTF8StringEncoding] autorelease];
[proxy writeStringToOutput:outpl];
}
else
{
fprintf(stderr, "%s\n", [error UTF8String] ?: "unknown error
serializing returned property list");
fprintf(stderr, "%s\n", [[[nibController parameters] description]
UTF8String]);
}
}
else
{
[proxy writeStringToError:@"There is no window with that token"];
}
}
I guess one could improve and simplify the code.
Is this worth to implement this?
Thanks,
--Hans
Hi,
I played with 'Show Bundles on Repository' a bit.
The only thing is that it is a bit slow.
Is there a reason for using svn list/cat?
My suggestion would it be is to use a direct way by using
Net::HTTP.get(URI.parse(url)).
It is much mor faster. Furthermore I implemented the entire download
stuff in many threads. By using these threads the descriptions are
downloaded in roughly 10sec (depending on the band-width of course).
Then I wrote a routine to install one or more bundles (also while
fetching the descriptions).
To be fast as possible I cache the already downloaded descriptions.
Thus if one invokes that command it looks for a description in the
cache. If something was found one sees it at once, but the
descriptions are still updated in the background.
I also modified the NIB a bit. If the fetching was finished the
progress bar also disappears. Furthermore I include a further
progress bar to indicate the install status.
Of course, there are some tiny unsolved issues, e.g. while fetching I
select one or more bundle; if the a result of a thread is written to
the dialog my selection could disappear.
Anyway, if you want to look at it here is a 10MB movie
http://www.bibiko.de/TM_GetBundle.mov
Is someone interested?
Will the getBundle issue be integrated in TM2?
Cheers,
--Hans
Hi,
regarding web development with TextMate and its web preview: I found the
http://wiki.macromates.com/GUI/WebPreviewEnhancements page, and wondered
if everything written there still applies, and if any workarounds exist,
especially for the following two issues:
> Don't close it when a different tab is selected in the TextMate main
> window
> Add an option to refresh the Web Preview window if "any" file in the
> project has changed. This would be useful for anyone editing CSS
> files and wishes to see the changes immediately.
The lack of these two features unfortunately makes the preview rather
useless when developing a new site from scratch while using a separate
CSS file.
I'll add to these that AFAICT, when editing a long HTML page, the web
preview goes back to the top each time it's refreshed, making it useless
again if you're working on an area at the bottom of the page.
Am I missing anything?
Thanks :).
--
Ciao,
Marco.
Can i order the files from drawer alphabeticaly, but fistly the folders,
then the files? It seems i get lost in the current alphabeticaly order.
--
Cristi
www.ralcr.com
Hi
I use the iClip multiple clipboard thingmy.
If I copy some text to iClip from outside TextMate then switch to
TextMate the copied text in iClip duplicates.
I've never seen this with any other app.
Could be something odd about iClip of course :)
Patrick
Hi,
I'd like to make my own theme for viewing documentation, since the default
dark themes are too hard for me to read. I can easily make themes for code
coloring, but how do I make themes for doc syntax coloring?
Thanks,
Nick
Hi Textmate-List,
is it possible that the labels which are automatically created on
writing a new chapter, section, subsection and so on also recognize
German Umlauts ä,ö,ü as well as ß? Right now these characters do not
got replaced by ae, oe, ue and ss so that you have to do it yourself
if you want end up in an compile error with latex (pretty annoying
when using the "WatchLatex" script). It would be of much help if the
label creation function could handle this. Can anyone help? As far as
I can see the regexp has to be extended.
Best regards,
Jan
Hello,
Is it possible to arrange tabs with file names into multiple lines? I
often have dozens of files open and it really becomes annoying to
switch between them.
So, instead of (fixed width :)
+-------+-------+-------+-------+----
| file1 | file2 | file3 | file4 | >>>
+-------+-------+-------+-------+----
it would be nice to see:
+-------+-------+-------+-------+
| file1 | file2 | file3 | file4 |
+-------+-------+-------+-------+
| file5 | file6 | file7 |
+-------+-------+-------+
Here's a screenshot of what I have in mind with multiple lines (the
first screenshot that I have found; used in another context, but
nevertheless):
http://www.emeditor.com/images/emeditor7_virtual_space.png
Thanks a lot,
Mojca
I'm trying to open the rcov script file for a ruby code coverage tool.
Instead of opening for edit... Textmate appears to try and run the script.
I've tried removing the #!/usr/bin/ruby
at the beginning of the file to no avail.
has anyone seen behavior like this?
thanks
Jay
http://files.xhtmlthis.com/textmate.mov
I made a little movie to show you everything, obviously my permissions
are fine, because I can create folders!
Thanks,
Garrett