[TxMt] Re: Working with "$DIALOG", nib and shell

Matthew Richmond matthew at choppingblock.com
Tue Apr 14 20:30:29 UTC 2009


Allan, your response is appreciated thanks. Unfortunately i am failing  
repeatedly when trying to cobble together a working example that  
parallels the screencast from 2006.

> The --load argument will load the nib and return a token (integer).
> This can then be used with --wait and --dispose.


How would i access the info that was input into the .nib file?

Currently i have this in my .sh file:

token="$DIALOG" nib --load ~/Desktop/Test2.nib --center --model  
'{ classPath = "bar" }' --parameters '{}';
"$DIALOG" nib --wait $token;
"$DIALOG" nib --dispose $token;

It's neither displaying the .nib file or displaying any errors. My  
goal is to pull 5 variables out of the .nib file.

For an idea as to what i am trying to do:
---- begin project description ----
I have extended the 'scaffold new flash/flex' project template from  
the Actionscript 3 bundle. Via the JavaScript API within Flash i have  
enabled a way for TextMate to create the flash binary files as well as  
the project scaffold (connecting them all together). This is terribly  
exciting for the Flash Community folks who already using TextMate to  
create projects.

Before i release it publicly (in tandem with an article on authoring  
ActionScript projects using TextMate) i wanted to extend the  
functionality of the project template to allow the end users to  
specify classPath, flashAppVersion, flashPlayerVersion, stageWidth and  
stageHeight. The best way to do this is ideally using a nib file,  
passing the user input to the shell script hat triggers it.
---- end project description ----

I would be more than wiling to publicly credit and and repeatedly  
thank anybody who may be willing to help get this dialog implemented.

Best,
</matthew>

On Apr 14, 2009, at 4:47 AM, Allan Odgaard wrote:

> On 11 Apr 2009, at 04:49, Matthew Richmond wrote:
>
>> [...]
>> "$DIALOG" nib --load ~/Desktop/Test2.nib --center --model  
>> '{ classPath
>> = "foo"; }' --parameters '{}'
>>
>> That usually opens the .nib window, when i close the window all i get
>> is an integer.
>
> The --load argument will load the nib and return a token (integer).
>
> This can then be used with --wait and --dispose.
>
>> Then it usually stops working all together, no matter how many time i
>> try and execute the line of code (control - R) nothing happens, i  
>> have
>> tried what Allan suggests in the post "So either press ⌃D to
>> “close” stdin, or give -p '{}' as argument, and things should  
>> work
>> as expected." And i cant get it to work, if i trash TextMate prefs  
>> and
>> reinstall, it works for a bit more.
>
> The -p'{}' and ⌃D does not apply in the async mode you are using the
> command.
>
> If you need to trash the TM preferences to make it work again, it
> indicates that they got “corrupted” — what could maybe be the
> reason is that an exception is thrown when loading your nib, and this
> is causing TM to go into a bad state.
>
> Open Utilities → Console to see if there is any output.
>
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate



-------------------------------------------
Matthew Richmond, Principal/Designer
The Chopping Block, Inc.
481 Broadway, 3rd Floor, New York, NY 10013
p 212.463.7574
f 917.591.7584
http://choppingblock.com
http://chopshopstore.com
-------------------------------------------
   World Domination Through Graphic Design
-------------------------------------------







More information about the textmate mailing list