Forum Replies Created

Page 4 of 5
  • Yeah! iconurl() did the job – now they are all visible again!
    But I’ll see into the other option, too – sounds interesting!

    Thank you very much for your help!

  • Thank you for your responses, I’ll give it a go!

  • Uwe Smidt

    Member
    July 6, 2024 at 10:11 am in reply to: Contribution to the community Comment

    Ola Diego,
    como estas?

    This is about all I can say in Spanish, so it’s great that we can meet in the middle, by writing in English – as good as we can 😉

    Thank you very much for your contribution, it is really appreciated, even if some of it is written in Spanish. It is still better to post it, than to keep it to yourself because it is a lot of work to rewrite it into English. I do a most of my #commenting and object naming in German, so I understand the problem here…

    But if someone finds the libraries / problems addressed interesting, there will be a way to overcome language barriers.

    Actually, it is not so much the aspect of not wanting to share my code/knowledge (it’s no big deal anyway), but much rather the work of extracting something special into something general that can be used without much explanation.

    But maybe your post will be the starting point of more people sharing interesting code snippets or complete libraries.

    Best regards

    Uwe

  • Uwe Smidt

    Member
    January 6, 2024 at 12:02 pm in reply to: Positioning Studio/IDE windows by code

    Dear $all,

    when trying to implement an automation of ‘switching between Omnis.cfg files per environment’, I came across an old Zombie🧟‍♂️: AppleScript! And Omnis does still support it, e.g. moving windows around. Below are some lines of code that do the job. Now I only needed the script to be executed with a keyboard shortcut – for which I found no working built-in solution.

    So I came across a utility called ‘Keyboard Maestro’ which did the rest: triggering the macro with a keyboard shortcut, and then calling the script ‘mobile’ if only one screen is present, or calling ‘Desktop’ if an external screen is present, too. Eh voila – I’ve got all my windows sorted nicely 😊!

    set vtop to 25
    set vleft to 0
    set vright to 3008
    set vbottom to 1692
    set vBottomRowTop to 1390
    set vOffset to 30
    set vStackForms to 0
    set vStackMethods to 0
    tell application "Omnis Studio 11 35659"
    set WinList to name of windows
    --display dialog WinList
    repeat with currentWindow in WinList
    set currentBounds to bounds of window currentWindow
    --display dialog currentWindow & ": " & currentBounds
    if currentWindow contains "Studio Browser" then
    set bounds of window currentWindow to {vleft, vtop, 1000, 800}
    else if (currentWindow begins with "rf" and currentWindow contains "methods") or (currentWindow begins with "ta") or (currentWindow begins with "tv") then
    -- Remote Form Methods, Table Class methods
    set bounds of window currentWindow to {1360 + vStackMethods, vtop + vStackMethods, 2360 + vStackMethods, 800 + vStackMethods}
    set vStackMethods to vStackMethods + vOffset
    else if currentWindow begins with "rf" and currentWindow contains "Grid" then # Remote Form
    set bounds of window currentWindow to {300 + vStackForms, vtop + vStackForms, 1200 + vStackForms, 450 + vStackForms}
    set vStackForms to vStackForms + vOffset
    else if currentWindow begins with "rf" then # Remote Form
    set bounds of window currentWindow to {300 + vStackForms, vtop + vStackForms, 1200 + vStackForms, 700 + vStackForms}
    set vStackForms to vStackForms + vOffset
    else if currentWindow contains "Component Store" then
    set bounds of window currentWindow to {vleft, 900, 199, vBottomRowTop - 1}
    else if currentWindow begins with "Field List" then
    set bounds of window currentWindow to {200, 900, 1100, vBottomRowTop - 1}
    else if currentWindow contains "Property Manager" then
    set bounds of window currentWindow to {2620, vtop, vright, 1014}
    else if currentWindow begins with "Catalog" then
    set bounds of window currentWindow to {2620, 1015, vright, vbottom}
    else if currentWindow contains "ucConstants" then
    set bounds of window currentWindow to {vleft, vBottomRowTop, 799, vbottom}
    else if currentWindow contains "Notation Inspector" then
    set bounds of window currentWindow to {800, vBottomRowTop, 1139, vbottom}
    else if currentWindow contains "Inheritance Tree" then
    set bounds of window currentWindow to {1140, vBottomRowTop, 1480, vbottom}
    end if
    end repeat
    end tell


  • Uwe Smidt

    Member
    December 21, 2023 at 1:27 pm in reply to: $makelist WITH column names / maxc() WITHOUT column names

    getting the maximum value of the the items in Col6 of the list

    (which I did get with with maxc(myList,myCol)).

    But I thought that myList.Col6.$maximum() would do the job without having a column name

  • Uwe Smidt

    Member
    December 19, 2023 at 4:31 pm in reply to: ‘vertical’ Scope of local variables and parameters

    Thank you guys 🙏!

    At least a work around.

    I helped myself with turning the local variables into instance variables. Works but is messy, dangerous & lacking elegance 💃…

  • Uwe Smidt

    Member
    December 19, 2023 at 4:22 pm in reply to: Defining row variables: variable pane vs $definefromsqlclass

    Hi Andreas,

    I’ve enclosed a screenshot of the code editor (but without the error – it comes up only occasionally when debugging on other areas…). The errors come up with lrGP.

    No copying of definitions, but see yourself…:

    Best regards

    Uwe

  • Uwe Smidt

    Member
    December 19, 2023 at 12:33 pm in reply to: DropList in a grid does not scroll on (too) many entries

    Hi Götz,

    I am working on MacOS 14.1.1 (23B81) Sonoma, Omnis 11 xxx5659, and on Safari, Chrome AND Firefox the droplist does not scroll.

    I’ll work around it in the meantime…

    Best regards

    Uwe

  • Uwe Smidt

    Member
    December 1, 2023 at 2:48 pm in reply to: simplifying code…

    Hi Andreas,

    yes, it does help – by knowing FOR SURE it doesn’t work – so I need not over strain my one brain cell ( I only have that one!), and by pointing me in the right direction. I will do a

    taSuper.$getValue(pSchema,pID,pFieldName)

    so I’m not limited to a predetermined field.

    Thanx a lot!

    Uwe

  • Uwe Smidt

    Member
    November 30, 2023 at 2:56 pm in reply to: Export to a file-issues

    issue c) is still unsolved (probably because of this forum software’s tendency to ‘beautify’ paragraphs after ‘preformatted text’ (code blocks etc)):

    How do I kindly ask Omnis to stick to system wide preferences regarding the formatting of numbers, i.e. comma as decimal separator, point as thousands separator?

  • Uwe Smidt

    Member
    January 2, 2024 at 2:35 pm in reply to: Positioning Studio/IDE windows by code

    Dear Andreas,

    Thanks for your response!

    Ironically, the Browser window is alway in the right place, but the Property and the Catalog window are the ones most needed and always in the wrong place 😉

    But at least I now understand why I don’t ‘see’ them in Omnis Notation Inspector…

    Regards

    Uwe

  • Uwe Smidt

    Member
    January 2, 2024 at 2:27 pm in reply to: Positioning Studio/IDE windows by code

    Dear Andreas,

    Happy New Year to you!

    Yes, this might be a workable workaround.

    But then I’d have to manage double pref files as config.json, omnis.cfg, sql.df1, query.df1.

    <font face=”inherit”>Do you know in which file the last environment is stored in? So I might just exchange that file via script, instead of doubling </font>the<font face=”inherit”> whole Studio installation.</font>

    Thank you!

    Regards

    Uwe

  • Uwe Smidt

    Member
    December 21, 2023 at 11:42 am in reply to: $makelist WITH column names / maxc() WITHOUT column names

    Thanx a lot Andreas!

    Both ways work fine!

    But why did this not work:

    # alternatively, try this
    Calculate liFormOldWidth as llFormObjectsOrig.Col6.$maximum()
    # is null

  • Uwe Smidt

    Member
    December 20, 2023 at 10:01 am in reply to: Defining row variables: variable pane vs $definefromsqlclass

    Good morning Andreas,

    Sorry, the picture was only to show that there were no ‘copydefintions’…, but straight forward code. It is an occasional bug, so I cannot reproduce it right now. My build is newer than the fixed one, so it could be a new/different bug (or old problem sitting in front of the computer)…

    I’ll send you a screenie as soon as the problem reoccurs, but now that the bug knows that YOU are watching it, it will probably hide…

    Have a great week!

    Uwe

    • This reply was modified 1 year, 7 months ago by  Uwe Smidt.
  • Uwe Smidt

    Member
    November 30, 2023 at 2:50 pm in reply to: Export to a file-issues

    Dear Joey,

    Thank you for your elaborate answer (including a great sample lib!) – so elaborate that it took me a while to evaluate 😉

    But now I did – and yes, you are right, $sendallref does the trick!

    Do ilExportList.$define() ## clear definition
    Do ilExportList.$add()
    # Alter, funktionierender Code ohne $Sendall:
    # For ilColList.$line from 1 to ilColList.$linecount step 1 ## für alle Spalten...
    # If ilColList.export ## NUR die markierten Spalten...
    # Do ilExportList.$cols.$add(ilColList.colname,kCharacter,kSimplechar,255) ## kommen in die Spaltenüberschriften
    # Calculate ilExportList.1.[ilColList.colname] as ilColList.title
    # End If
    # End For
    Do ilColList.$sendall(ilExportList.$cols.$add($sendallref.colname,kCharacter,kSimplechar,255),$ref.export) ## ACHTUNG: hier $sendallref erforderlich, da mit ...$add eine Untermethode mit Parameter aus der Übermethode ...$sendall aufgerufen wird. Nur so wird der Parameter korrekt übergeben (byValue vs byRef)
    Do ilColList.$sendall(ilExportList.1.[$ref.colname].$assign($sendallref.title),$ref.export)

    Because in ilExportList.$cols.$add($sendallref.colname<font face=”inherit”> the $add sends </font>the<font face=”inherit”> parameter into another method, which is why $ref’s by Value does not work, but $sendallref’s by reference does! </font>

    <font face=”inherit”>Thank you for your help in grasping an important difference!</font>

    <font face=”inherit”>Best regards</font>

    <font face=”inherit”>Uwe</font>

Page 4 of 5