• add -n/--new-items switch to tm_dialog

This options is a bit low-level but here goes; when using an array controller 
we can have that array controller create new objects (by connecting to the 
‘add:’ action), unfortunately in IB we can only specify the class to be used 
for these new objects, not give a prototype object (i.e. all fields will be 
blank).

With this new option you can set the class (in IB) to “SQL_New_Connection” and 
then give: -n '{ SQL_New_Connection = { title = untitled;  }; }' to tm_dialog. 
Before loading the nib, the dialog plug-in will create a dummy 
SQL_New_Connection class which, when instances of this class are created, will 
return a dictionary with the title = untitled key/value pair.

Since a class is actually registered (at run-time), you should use a name which 
is unlikely to clash with existing classes.

Changed:
U   trunk/Tools/Dialog PlugIn/Dialog.h
U   trunk/Tools/Dialog PlugIn/Dialog.mm
U   trunk/Tools/Dialog PlugIn/Dialog.xcodeproj/project.pbxproj
A   trunk/Tools/Dialog PlugIn/TMDChameleon.h
A   trunk/Tools/Dialog PlugIn/TMDChameleon.mm
U   trunk/Tools/Dialog PlugIn/tm_dialog.mm

_______________________________________________
textmate-dev mailing list
[email protected]
http://lists.macromates.com/mailman/listinfo/textmate-dev

Reply via email to