Hi all,
I have been trying forever and am getting nowhere for the moment “ maybe I can get someone to help me a bit, stir me in the right direction.
I have a tab-delimited text, that is a list of publications with sizes.
I would like to have something like this:
1- at launch, read the file and get its content
2- populate combobox with Publication Names (item 1 of each paragraph I guess)
3- based on the chosen publication, some forms will automatically fill up with the various sizes info (editable)
It seems simple enough “ but I have tried countless methods and am sure I came close at one point or another.
But I am pretty desperate.
Thanks for any help.
Here is the bit I have so far, in which I am trying to fill up the combobox with the item 1 of the tab-delimeted file, “adPublication”.
My combobox has it Content bound to ArrayControler with “adPublication” as Model Key Path.
property parent : class "NSObject"
property combobox : missing value
property theData : {}
property theArrayController : missing value
property AdPublication : missing value
on applicationWillFinishLaunching_(aNotification)
set theFile to (choose file with prompt "Choose tab-delimited file:")
set theEntries to paragraphs of (read theFile as text)
repeat with anEntry in theEntries
set theValues to (tabbedText's componentsSeparatedByString_(tab)) as list
set AdPublication to item 1 of theValues
tell theArrayController to addObject_(AdPublication)
end repeat
end applicationWillFinishLaunching_