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

Re: Re: wxWidgets (again)

Integrated Application Platform › Forums › General › wxWidgets (again) › Re: Re: wxWidgets (again)

January 23, 2012 at 8:14 pm #910
Anonymous
Inactive

Hi Andrew,
point taken. (Allocation) So let’s start again from this wxWidget class. I’ll skip the C wrapper.


//wxWidgets C++
class wxStringMap
{
public: wxStringMap();
virtual ~wxStringMap();
bool HasValueFor(const wxString& key) const;
const wxString& ValueFor(const wxString& key) const;
};

Our Suneido class could look like :


wxStringMap = class
{
isDisposable: true;
classptr: 0;

New()
{
,classptr = dll long* wxsuneido:wxStringMap_CTor()
}

//NON Thread save, we need a _mutex_lock_ here
Dispose()
{
if (.isDisposable)
{
IsDisposable = false;
// Call class destructor
dll void wxsuneido:wxStringMap_DTor( .classptr )
}
.isDisposible = true;
}

HasValueFor( key )
{
//autogenerated ?? Assert( key.isString() ) ]
return dll bool wxsuneido:wxStringMap_HasValueFor( classptr, key.towxString())
}

/// etc.
}

Now you see that I have used Dispose (DOTNET style) instead of Destroy.
Slightly Off topic
Maybe we can add a small convenience (syntax sugar) feature to Suneido :
alias Dispose Dwstroy;
//or
alias long* wxObjPtr;

For me this is bread and butter.
// D code;
class ArrayList( T ) { }
alias ArrayList!( int ) IntegerList;
IntegerList il = new IntegerList();
I know that you like that!!



OKay . For all wxWidgets constants, enums, and global variables we can create Suneido code. Right now.
Same is also valid for the C Function wrapper DLL .F.I.
extern “C” __declspec(dllexport) bool wxStringMap_HasValueFor(wxStringMap* self, const char* key)

What needs some attention is the Suneido class generation..
Open Questions are event-handling,…. Suneido’s layout manager vs. wxWidgets Layout manager. .keeping the current Suneido “Business objects” as far as possible in sync with wxwidgets. …..
Quit some stuff. I would prefer to discuss details via email (if you like ) makes it a bit easier for me.
email starts with amckinlay ?
Bjoern
ps. till next Sunday I have to work on a commercial project, so icase that my feedback takes awhile don’t worry.

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 © 2023 Axon® Development Corporation. All Rights Reserved. - Open Source Integrated Database and Programming Language