Recent

Author Topic: ESS Model  (Read 23857 times)

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3645
  • I like bugs.
ESS Model
« on: April 25, 2010, 04:37:53 pm »
@Leledumbo (and others, too).

I have hard times porting ESS Model program. There are more problems than I anticipated.
Now finally I got a windows machine myself and installed Delphi 2009 there.
I tested the original Delphi version of ESS Model there. It is stable but doesn't show any diagrams. I only see a striped canvas which doesn't even fill the whole empty area.

Today things don't work for me! Have I done useless work? If I knew there were so many problems with this prog I wouldn't have started porting it.

Do other people really see diagrams with ESS Model built with Delphi?

Juha

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3645
  • I like bugs.
Re: ESS Model
« Reply #1 on: April 25, 2010, 05:14:02 pm »
Ok, indeed, the original binary built with Delphi 6 works and shows diagrams!
Could someone please build from source again with Delphi 6? Or maybe with Delphi 7, I guess it is still popular. I started to think the source is stripped somehow. No wonder the project didn't see any activity for years.

I removed DRAG_SUPPORT from the project but it should not affect because I am not dragging anything.

The problem can also be the fancy way the program is made. Lots of interfaces are used. There are typecasts which give run-time errors when built with Lazarus. It could be made in a simpler way.

Juha

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3645
  • I like bugs.
Re: ESS Model
« Reply #2 on: April 25, 2010, 05:15:25 pm »
and the files can be found here:

http://sourceforge.net/projects/essmodel/files/

Leledumbo

  • Hero Member
  • *****
  • Posts: 8111
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: ESS Model
« Reply #3 on: April 26, 2010, 04:02:16 am »
I'll give my previous attempt, but where should I post it? This forum surely is not a choice, since it doesn't accept executables and > 128 KB attachment.

I haven't gotten time to retry with current Lazarus snapshot. Moreover, the (maybe) unfinished new autosize code might be a stopper, but I believe it can be done.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3645
  • I like bugs.
Re: ESS Model
« Reply #4 on: April 26, 2010, 08:48:27 pm »
I managed to create a version of EssModel that runs and doesn't crash under Lazarus!
I essentially removed all interfaces and replaced them with abstract base classes and virtual functions and some code to redirect the calls.
I am not sure if this is the right approach. Please feel free to improve.

It does not draw the diagram properly but draws something at least. The treeview is not updated properly.

Leledumbo, did you get your version to draw diagram while leaving the interfaces there? I didn't see any diagram even when building with Delphi2009. Something about interfaces has changed since Delphi6.

The code is now in GitHub repository. To download :
  git clone git://github.com/JuhaManninen/Pascal.git

I will give write access to anyone who wants it, once I learn how to do it.
This is the first git repository I have put up myself.

Juha

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3645
  • I like bugs.
Re: ESS Model
« Reply #5 on: April 26, 2010, 10:00:46 pm »
Contributions to a GitHub repo happen by forking my repo, changing it and sending a pull request to me.

http://jagregory.com/writings/git-remotes-contributions-and-the-letter-n/

It seems you can have forks of many repos in GitHub even with the free personal account.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8111
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: ESS Model
« Reply #6 on: April 27, 2010, 03:37:49 am »
Quote
Leledumbo, did you get your version to draw diagram while leaving the interfaces there? I didn't see any diagram even when building with Delphi2009. Something about interfaces has changed since Delphi6.
The converted one? Yes, but only the diagrams and arrows, no methods nor properties. I have no idea why this happens.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3645
  • I like bugs.
Re: ESS Model
« Reply #7 on: May 06, 2010, 07:34:53 am »
EssModel is now working somehow. It shows diagrams of at least some programs.
I modified the code heavily, replacing interfaces with listener classes etc.
It would need much more work to make this a really good program.
Anyone interested, please take a look.
 $ git clone git://github.com/JuhaManninen/Pascal.git

Juha

Leledumbo

  • Hero Member
  • *****
  • Posts: 8111
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: ESS Model
« Reply #8 on: May 06, 2010, 08:33:52 am »
Can you make a webpage for the github that contains zipped download? I don't have (and don't know) any good (and portable since I must access it from campus through proxy) git client.

I also started the conversion last night, but I haven't changed the code as much as you.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3645
  • I like bugs.
Re: ESS Model
« Reply #9 on: May 06, 2010, 11:17:00 am »
Can you make a webpage for the github that contains zipped download? I don't have (and don't know) any good (and portable since I must access it from campus through proxy) git client.

I also started the conversion last night, but I haven't changed the code as much as you.

I am not so happy about making a zipped download now. I am changing the prog and I would need to update the zip package every time. It just doesn't make sense.
If the program gets more stable and worth publishing, then I will make it.

I have tested git client also on Windows, it works well. It should work on Apple as well. And naturally it works on Linux. What other platforms you need supported?
There are nice graphical tools "git gui" and "gitk". I never felt a need for other graphical clients.

EssModel still has problems:
RecentFiles can't be written to registry (XML file under Linux).
TreeView doesn't have icons.

I was fixing memory leaks. Starts to look OK.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3645
  • I like bugs.
Re: ESS Model
« Reply #10 on: May 06, 2010, 11:22:42 am »
Hi,

I copy here the instructions I wrote to Lazarus mailing list about GitHub work flow, in case someone wants to change the code:

The GitHub "free plan" account allows only one personal repository and no
other direct committers. However, it allows you to fork any number of existing
repositories, change them and then send pull requests.

The flow is explained nicely here:
http://jagregory.com/writings/git-remotes-contributions-and-the-letter-n/

First, at http://github.com:
 1. Create a "free plan" account.
 2. Find my Pascal repository.
 3. Click the Fork-button. Now you have a forked Pascal repo.

Then at your machine:
 $ git clone git://github.com/YourName/Pascal.git
 Edit code ... git commit ... repeat if needed.
 $ git push origin

Then again at http://github.com:
Select your forked Pascal repo and click "Pull Request" button. There should
be my name selected automatically.

It is actually cool. I was wondering how git users can pull from each other
when most people have dynamic IP addresses. GitHub is one way to solve that.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8111
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: ESS Model
« Reply #11 on: May 07, 2010, 07:23:00 am »
Quote
I am not so happy about making a zipped download now. I am changing the prog and I would need to update the zip package every time.
Use dynamic archiving that only zips upon requests.
Quote
I copy here the instructions I wrote to Lazarus mailing list about GitHub work flow, in case someone wants to change the code:
Ok, I'll try it.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3645
  • I like bugs.
Re: ESS Model
« Reply #12 on: May 07, 2010, 08:36:16 am »
Use dynamic archiving that only zips upon requests.

Right, I noticed GitHub makes the zip package automatically from the latest sources. Cool.
If you have problems configuring the git repo, I am ready to help through chat or e-mail.

Juha

Imants

  • Full Member
  • ***
  • Posts: 180
Re: ESS Model
« Reply #13 on: June 12, 2012, 08:00:57 pm »
@Leledumbo (and others, too).

I have hard times porting ESS Model program. There are more problems than I anticipated.
Now finally I got a windows machine myself and installed Delphi 2009 there.
I tested the original Delphi version of ESS Model there. It is stable but doesn't show any diagrams. I only see a striped canvas which doesn't even fill the whole empty area.

Today things don't work for me! Have I done useless work? If I knew there were so many problems with this prog I wouldn't have started porting it.

Do other people really see diagrams with ESS Model built with Delphi?

Juha

Sorry to revive dead topic. But you could not load any model with delphi 2009 and lazarus because program uses PChar and string variables to read from stream whitch in lazarus and Delphi is UTF8 you I changed them to PAnsiChar and AnsiString and all loded perfectly

edit:
I even kinda semi successfully (some functionality lost, but model was drawn perfectly) ported it to lazarus
« Last Edit: June 12, 2012, 08:47:07 pm by Imants »

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3645
  • I like bugs.
Re: ESS Model
« Reply #14 on: June 12, 2012, 11:03:21 pm »
I even kinda semi successfully (some functionality lost, but model was drawn perfectly) ported it to lazarus

Hey, you are clever!
How did you solve the interface delegation part? (Maybe FPC trunk already supports it)
Would you like to share your ESS Model port?

Regards,
Juha