Suneido

Integrated Application Platform

  • Home
  • Learning
    • Suneido Manual
    • Beginners
      • Inside Suneido
      • The Suneido Programming Language
      • The Suneido Database
      • Installing Suneido
      • Building Suneido
      • IDE Go To Tour
      • Upgrading To A New Release
    • Advanced
      • Canvas Control
      • DrawControl Part 1
      • DrawControl Part 2
      • DrawControl Part 3
      • SAX Like XML Processing
      • A Plug-In Architecture
      • A Simple Wizard Framework
      • An HTML Include Facility
      • An RSS 2 Feed Creator
      • MIME Generation
      • A New Add-on Facility
      • Workspace Improvement Hack
    • Mockito for Suneido
    • The Suneido Task Scheduler
    • Contributing To Suneido
    • Contributor Assignment of Copyright
    • Language Translation
    • Future Directions
    • Interview With Andrew Mckinlay
  • Forum
    • Announcements
    • Internals & Enhancements
    • Cookbook
    • General
  • FAQ
  • Screenshots
  • Downloads
  • Links

amckinlay

  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 15 posts - 181 through 195 (of 197 total)
← 1 2 3 … 12 13 14 →
  • Author
    Posts
  • April 20, 2011 at 4:44 pm in reply to: Display issues with adding/removing from VertConrol #839
    amckinlay
    Keymaster

    PS. Part of the reason for the WndPane might have been to get the tab order.

    April 20, 2011 at 4:38 pm in reply to: Display issues with adding/removing from VertConrol #838
    amckinlay
    Keymaster

    Nice idea! I’ll try it.

    Note: When you have multiple monitors, some of them can be at negative coordinates (but that is screen coordinates, not window coordinates)

    My modifications were not a good solution – they cause problems with some things e.g. ListView in QueryView

    Technically, suneido/stdlib isn’t using MFC, it is just using the Win32 api (like MFC does).

    It would be an interesting project to rewrite Suneido in .NET, but it took me a couple of years to do the Java rewrite, and .NET would probably be comparable. Maybe there is some way to allow the current suneido.exe to call .NET code (similiar to the current dll interface used to call Win32 api’s).

    April 17, 2011 at 7:12 pm in reply to: Display issues with adding/removing from VertConrol #835
    amckinlay
    Keymaster

    That makes sense.

    When it creates the control (via Hwnd.CreateWindow) it does not know the final size or position – this is determined by the layout Recalc

    So it creates it at an arbitrary position and size and then the first Resize adjusts the position and size.

    This works fine when you are constructing the whole window at once because you only see the final result. But not so good with dynamically creating controls.

    I’m still not sure why it’s actually getting painted with the original (wrong) position/size. I thought painting wasn’t done till you returned to the message loop and processed paint messages. Unless you call UpdateWindow, but I do not think it is getting called.

    Maybe what we should be doing is creating the controls without WS.VISIBLE and then making them visible after the first Resize (SetWindowPos)

    I made this simple test:

    Window(Controller
    {
    Xmin: 800
    Ymin: 600
    Controls: (Vert (Button Add))
    On_Add()
    { .Vert.Insert(.Vert.Tally(), #(Field)) }
    })

    It flickers. If I add this in Hwnd.CreateWindow just before CreateWindowEx

    .show = (style & WS.VISIBLE) is WS.VISIBLE
    style &= ~WS.VISIBLE

    and add this in Hwnd.Resize just before SetWindowPos

    if .show
    {
    .SetVisible(true)
    .show = false
    }

    Now my simple test does not flicker ๐Ÿ™‚ But RepeatControl still flickers ๐Ÿ™ Maybe something to do with it using WndPaneControl ?

    WARNING: Be careful modifying Hwnd or similar code. For example, if you make a syntax error you can crash the Suneido UI. I usually Dump() just before making these kinds of changes. Then if you crash you can restore with suneido -load

    April 16, 2011 at 10:25 pm in reply to: Display issues with adding/removing from VertConrol #833
    amckinlay
    Keymaster

    I agree the flickering is annoying. I guess I have just got used to it!

    I think this is coming from the .WindowRefresh() in Group (parent of Vert and Horz) Insert and Remove

    Because of stretchable controls and fill, adding or removing (or resizing) a control can cause non-local changes, so the layout for the entire window has to be recalculated. Of course, most of the time only certain parts of the window actually change.

    WindowBase.Refresh does combine multiple refreshes to reduce the flickering.

    The refresh ends up calling Resize on each control which usually ends up in Hwnd.Resize that calls SetWindowPos. But it still flickers even if I change this to not call SetWindowPos if the size is the same.

    Now that I look at it, I’m not sure where the flickering is actually coming from.

    If you are using FieldControl is has a .Repaint() in .SetBgndColor which is probably unnecessary when called by New. But commenting it out doesn’t help.

    The SWP.NOCOPYBITS in Hwnd.Resize is suspicious, but again commenting it out doesn’t help.

    The CS.REDRAW in the Window class definitions in Init also caught my eye, but removing it didn’t help.

    It seems like something is erasing and redrawing the whole window, but I can’t find where that would be coming from.

    Sorry, I am stumped. I wrote most of this code, but it was a long time ago!

    Anyone else have any ideas?

    April 11, 2011 at 4:43 pm in reply to: Forum Database Manager #824
    amckinlay
    Keymaster

    Try this:

    http://archives.suneido.com/suneido-forum-archive.zip (8 mb)

    Note: It doesn’t include any associated “attachments”.

    April 11, 2011 at 4:41 pm in reply to: Newb Window Canvas Question #831
    amckinlay
    Keymaster

    I think you need to add a CanvasImage. Image is a lower level built-in class for loading image files.

    Canvas was written for DrawControl (SuneiDraw). You can look at the DrawControl code for usage.

    Is there a particular reason you are using Canvas? You’re welcome to use it, but it’s not the normal user interface for Suneido. (We don’t use it in any of our applications.)

    April 9, 2011 at 10:25 pm in reply to: Library View behavior #825
    amckinlay
    Keymaster

    Yeah, I can see your point.

    Opening in the current tab would be more like a web browser.

    Currently it works more like a text editor where each “file” is opened in a new tab. For example, this is how Eclipse works.

    But unlike a text editor, Library View saves as soon as you leave a tab, so you can’t have multiple tabs with unsaved changes.

    One option would be to only keep N tabs open and automatically close the least recently used one.

    I’ll think about it. Thanks for the suggestion.

    April 9, 2011 at 5:54 pm in reply to: Newb Window Canvas Question #828
    amckinlay
    Keymaster

    Sorry, my mistake.

    Here’s what I ran from the WorkSpace:

    w = Window(#(Vert (Canvas)))
    w.Vert.Canvas

    I missed that you’re using a Controller, so it becomes:

    w = Window(Controller { Controls: (Vert (Static hello)) })
    w.Ctrl.Vert.Canvas

    (the top level control in a window can be referenced as Ctrl)

    You can always do Inspect(w) to see what you’re getting.

    It is often better is to use FindControl

    w.FindControl(‘Canvas’)

    This will search through the control tree for a control with that name, so it won’t break when you change your layout.

    If you have multiple controls of the same type you need to give them unique names:

    (Vert (Field name: one) (Field name: two))

    April 9, 2011 at 2:06 pm in reply to: Forum Database Manager #822
    amckinlay
    Keymaster

    I think we converted the old forum to static pages, if so, we should be able to zip up the contents for you.

    I’ll look into it.

    April 9, 2011 at 1:33 pm in reply to: Newb Window Canvas Question #826
    amckinlay
    Keymaster

    You need to keep a reference to the Window.

    w = Window(…

    Then you can do:

    w.Vert.Canvas.AddItem(…

    Or if it’s just setup stuff, you can do it in a New method in the Controller.

    I’m not sure how much Canvas has been used lately so let me know if there are any problems.

    April 5, 2011 at 5:32 pm in reply to: jSuneido Goes Live #809
    amckinlay
    Keymaster

    Thanks ๐Ÿ™‚

    The jSuneido source code is available from the Mercurial repository on SourceForge.

    http://sourceforge.net/projects/suneido/develop

    I will include a pre-built jar file in the next download.

    April 4, 2011 at 2:38 pm in reply to: How to run function in "mylib" in workspace #820
    amckinlay
    Keymaster

    Glad you got it figured out.

    Those “obvious” little things will get you every time!

    There should probably be validation in Library View for capitalized names.

    January 12, 2011 at 3:33 pm in reply to: Browse functionality #806
    amckinlay
    Keymaster

    Yes, Browse is not good for large data ๐Ÿ™

    To display (but not edit) large amounts of data you can use ListView. This is what QueryView uses.

    One option would be to add editing to ListView

    It should be easy to add an option to copy a record.

    What do you mean by “entering the column”? You can tab through the columns.

    December 23, 2010 at 8:31 pm in reply to: How do I get the Events ComObject? #805
    amckinlay
    Keymaster

    Sorry, this is not implemented.

    If I remember correctly, COM events are like callbacks. It could be implemented something like the callbacks in the DLL interface. But I think you need to implement a COM interface, not just a single function, so it is more complicated.

    December 6, 2010 at 9:52 pm in reply to: jSuneido Update #804
    amckinlay
    Keymaster

    I posted the latest jar on SourceForge:

    http://sourceforge.net/projects/suneido/files/Snapshots/jsuneido20101121.jar/download

    I have attached a dump of the latest stdlib, you should be able to load this with:

    java -jar jsuneido.jar -load stdlib.su

    You can use -repl to get a simple command line interface to jsuneido

    You may want to specify -ea (enable asserts) and -Xmx256m (or larger – maximum heap size), for example:

    java -ea -Xmx256m -jar jsuneido.jar -repl

    I use a batch file called jsuneido.bat to simplify this:

    @java -ea -Xmx256m -jar jsuneido.jar %1 %2 %3 %4 %5 %6 %7 %8 %9

    Note: To work with the suneido.exe client you either need to specify -iv (ignore version) to suneido.exe or to specify -i “…” to jsuneido.jar to “impersonate” a specific version

  • Author
    Posts
Viewing 15 posts - 181 through 195 (of 197 total)
← 1 2 3 … 12 13 14 →

Search Forums

Log In
Welcome to the new Suneido Web Site and Forum.
Register
Lost Password
users of the previous PHPBB Forum should be able to log in with their previous username and password.

Recent Topics

  • Alpha copy of gSuneido to play with
  • how to start jsuneido ?
  • Problem Starting Suneido…
  • Dialog not showing buttons
  • New link for Suneidojo

Contact Us | Legal Statement | Privacy Statement | SiteMap

Copyright ยฉ 2026 Axonยฎ Development Corporation. All Rights Reserved. - Open Source Integrated Database and Programming Language