Template
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Livecode Opensource Backer
- Posts: 9388
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Template
I am aware of the template stack, and one can muck around with the settings of that so every stack one subsequently produces follows the properties of that.
I would like to know if, somewhere inwith the IDE there reside templates of other objects/controls, such as buttons or fields, and if so where they are, so, for instance, I can set things up so that, in future, in my LC IDE every button can appear with the textColor already set to British Racing Green, whether its 3D is set to true or not.
I would like to know if, somewhere inwith the IDE there reside templates of other objects/controls, such as buttons or fields, and if so where they are, so, for instance, I can set things up so that, in future, in my LC IDE every button can appear with the textColor already set to British Racing Green, whether its 3D is set to true or not.
Re: Template
I don't think there are more "templates" buried in the IDE, the tool palette does this "on the fly"
by setting all these props for the templateXXX before the actual control is created.
Maybe you could create a library (or front or backscript), but be aware that you need to create e.g.
a button only via the message box or script, since the tools palette will always overwrite your settings.
by setting all these props for the templateXXX before the actual control is created.
Maybe you could create a library (or front or backscript), but be aware that you need to create e.g.
a button only via the message box or script, since the tools palette will always overwrite your settings.
-
- Livecode Opensource Backer
- Posts: 9388
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Template
What about creating your own littel tools palette for this?
Where a doubleclick on a control in the palette would create a control with YOUR settings?
Where a doubleclick on a control in the palette would create a control with YOUR settings?
-
- Livecode Opensource Backer
- Posts: 9388
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Template
Poking around in the stackScript of the Tools palette I have found these:
templategraphic
templateGroup
#Reset the templates we are going to use
templatebutton
templateimage
BUT no 'templateField'
templategraphic
templateGroup
#Reset the templates we are going to use
templatebutton
templateimage
BUT no 'templateField'
Re: Template
Maybe that is handled by one of the gazillion other REV libs?
And what has that to do with my proposal?
And what has that to do with my proposal?
-
- Livecode Opensource Backer
- Posts: 9388
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Template
Nothing much.And what has that to do with my proposal?
-
- VIP Livecode Opensource Backer
- Posts: 4003
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Template
Hi Richmond,
You could try to change the file for the field: com.livecode.interface.classic.Field.tsv
/Applications/LiveCode 9.X.X.app/Contents/Tools/Toolset/resources/supporting_files/property_definitions/com.livecode.interface.classic.Field.tsv
On a Mac you can open Livecode.app by right clicking on the icon and choose "Information". Then follow the path to com.livecode.interface.classic.Field.tsv above.
Try to edit that file and see if it does what you want and save it.
You might want to save the original file first and work on a copy.
Kind regards
Bernd
You could try to change the file for the field: com.livecode.interface.classic.Field.tsv
/Applications/LiveCode 9.X.X.app/Contents/Tools/Toolset/resources/supporting_files/property_definitions/com.livecode.interface.classic.Field.tsv
On a Mac you can open Livecode.app by right clicking on the icon and choose "Information". Then follow the path to com.livecode.interface.classic.Field.tsv above.
Try to edit that file and see if it does what you want and save it.
You might want to save the original file first and work on a copy.
Kind regards
Bernd
-
- Livecode Opensource Backer
- Posts: 9388
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Template
Thank you, Bernd.
Is a .tsv file simply a text file or something more complicated?
Is a .tsv file simply a text file or something more complicated?
-
- VIP Livecode Opensource Backer
- Posts: 4003
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Template
It is a tab separated value file. All values of a line are separated by a tab. Similar to CSV which uses comma.richmond62 wrote: ↑Wed Nov 08, 2023 1:28 pmThank you, Bernd.
Is a .tsv file simply a text file or something more complicated?
Every tab separated value goes into the respective column, empty values put empty into the respective column.
It is how you can feed data for a spreadsheet.
I _think_ this should work so that when you grab a "Field" from the toolbar it has the properties you define in the xxx.tsv file.
Kind regards
Bernd
Re: Template
AHA, thanks for the hint, Bernd!
-
- VIP Livecode Opensource Backer
- Posts: 4003
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Template
Richmond,
Using a spreadsheet program is probably the easiest way, you would have to save the changes to a "TSV" file.
Kind regards
Bernd
Using a spreadsheet program is probably the easiest way, you would have to save the changes to a "TSV" file.
Kind regards
Bernd
-
- VIP Livecode Opensource Backer
- Posts: 4003
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Template
I forgot:
TSV is a simple text file with the tabs as separators.
Kind regards
Bernd
TSV is a simple text file with the tabs as separators.
Kind regards
Bernd
-
- Livecode Opensource Backer
- Posts: 9388
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Template
Well, I have 9 year olds importing delimited text files into table fields, altering them, and the exporting them: so there should be hope for me.
Probably with the help of LibreOffice.
Probably with the help of LibreOffice.