publishing an intermediate release 3.1.0?

  • rbe2012
  • rbe2012's Avatar Topic Author
  • Offline
  • So much to do, so little time...
More
26 Nov 2013 16:52 #15864 by rbe2012
Replied by rbe2012 on topic publishing an intermediate release 3.1.0?
Thanks for resolving this. A stupid marking mistake. The emulator is is not impressed... It looks really funny. I don't understand much of arts, but is this impressionistic? Maybe that's the extraordinary look what some users missed with deviation...

Sorry, Hexperience.
The topic has been locked.
  • rbe2012
  • rbe2012's Avatar Topic Author
  • Offline
  • So much to do, so little time...
More
26 Nov 2013 17:11 #15865 by rbe2012
Replied by rbe2012 on topic publishing an intermediate release 3.1.0?
Updated to beta-15.
The topic has been locked.
More
26 Nov 2013 20:15 #15876 by Hexperience
Replied by Hexperience on topic publishing an intermediate release 3.1.0?
One thing to note: If the model icon is missing it should choose the default icon?...

There are 10 types of people in this world. Those that understand binary and those that don't.
The topic has been locked.
  • rbe2012
  • rbe2012's Avatar Topic Author
  • Offline
  • So much to do, so little time...
More
27 Nov 2013 06:19 #15901 by rbe2012
Replied by rbe2012 on topic publishing an intermediate release 3.1.0?
I'll look into, but as far as I remember the default icons are only used if no icon name is given - not if the icon image file does not exist. But should be easy to correct.
The topic has been locked.
More
27 Nov 2013 06:42 - 27 Nov 2013 06:45 #15905 by vlad_vy
Replied by vlad_vy on topic publishing an intermediate release 3.1.0?
Hmmm, if I see the black box instead model icon, I understand that I haven't the model icon. If I see the default icon instead model icon, what I will think? Something wrong? Model setting are reset? Something else?

Possible, will be better place question mark or 'icon missed' in black box.
Last edit: 27 Nov 2013 06:45 by vlad_vy.
The topic has been locked.
  • rbe2012
  • rbe2012's Avatar Topic Author
  • Offline
  • So much to do, so little time...
More
27 Nov 2013 07:11 #15906 by rbe2012
Replied by rbe2012 on topic publishing an intermediate release 3.1.0?
The behavior is as I expected: a missing icon file results in a non-drawn icon. I have a patch for this: check for the existence of the icon file while reading the model config and if not, use the default icon. When the model is saved, this standard icon is saved with it (and the information about the former configured icon is lost, even if you place the icon image in the modelico folder later). This version compiles for Devo7e too...
Is this what we want?
Or should I only show a default icon when the file does not exist? But this will make things harder because I will have to change some functions to achieve this (like model_loadsave, main_layout, main_page). Not sure if this will fit for Devo7e.
The topic has been locked.
More
27 Nov 2013 08:08 #15913 by FDR
I would retain the setting, but I don't even mind the black box if the file is missing...
The topic has been locked.
More
27 Nov 2013 09:35 #15919 by vlad_vy
Replied by vlad_vy on topic publishing an intermediate release 3.1.0?
As for me, I don't see any need to change anything with icon. I don't like 'smart' software that changed settings without my permission.
The topic has been locked.
More
27 Nov 2013 10:20 #15920 by richardclli
Replied by richardclli on topic publishing an intermediate release 3.1.0?
me too no need to change the behavior of icon
The topic has been locked.
  • rbe2012
  • rbe2012's Avatar Topic Author
  • Offline
  • So much to do, so little time...
More
27 Nov 2013 11:46 #15921 by rbe2012
Replied by rbe2012 on topic publishing an intermediate release 3.1.0?

vlad_vy wrote: I don't like 'smart' software that changed settings without my permission.

But we have this already for the model's name. If "NONE" is found, it is transformed to "ModelXX" (XX=number) so this is not really besides that in case of the icon file the model is already configured.
I will see if I can display a default icon only on the main page if the file is missing without changing the model config at all.
The topic has been locked.
More
27 Nov 2013 16:28 #15932 by Hexperience
Replied by Hexperience on topic publishing an intermediate release 3.1.0?
I only brought it up because the size of the black box threw me off. How about if the file is missing the box gets set to 96x96 size?

There are 10 types of people in this world. Those that understand binary and those that don't.
The topic has been locked.
More
27 Nov 2013 17:47 #15935 by PhracturedBlue
Replied by PhracturedBlue on topic publishing an intermediate release 3.1.0?
FYI, I'm slowly getting through the changes now. I'm all the way up to beta02 now :) So far, everything looks ok. I've seen a couple things I would do differently, but nothing major. It just takes time to look at each patch and understand what it does.
The topic has been locked.
More
27 Nov 2013 18:27 - 27 Nov 2013 19:18 #15936 by PhracturedBlue
Replied by PhracturedBlue on topic publishing an intermediate release 3.1.0?
Ok,
It looks like I hit the 1st real snag in beta06.
I don't like the tr_n function at all.
I understand what you are trying to do, but I'm really not happy with this approach.
If we go this route, it would be better to just have an snprintf function., but there is a reason I don't have it available.
Another possibility is a static checker to find these issues.
Sadly this change will make it much harder to pull in changes after beta06, since I'll need to manually do a diff and fixup (if I pull in beta06 and then revert, I end up with a huge number of lines being touched which makes 'hg annotate' basically useless, and it is something I use a lot)

I'll need to think on this before I can proceed.

Edit: And now I see the various string variables were replaced with a single one.
This one is probably okay, though it does use more RAM than the original solution. If I find a solution (that i like) to resolve the issue that resulted in the creation of tr_n, I'm not sure I need this though.
Last edit: 27 Nov 2013 19:18 by PhracturedBlue.
The topic has been locked.
  • rbe2012
  • rbe2012's Avatar Topic Author
  • Offline
  • So much to do, so little time...
More
27 Nov 2013 19:30 #15940 by rbe2012
Replied by rbe2012 on topic publishing an intermediate release 3.1.0?
A size of 300 chars was a rough guess - we probably can reduce it, but it depends on the translations (and esp. those with utf-8-characters).
I thought about implementing dialog translations and other different because the first need much more characters than those for labels and menus.
The topic has been locked.
More
27 Nov 2013 23:02 #15944 by PhracturedBlue
Replied by PhracturedBlue on topic publishing an intermediate release 3.1.0?
I modified the printf code to add snprintf support based on this:
github.com/mludvig/mini-printf
It adds less than 100 bytes of code.
I think that using snprintf will negate most of the need for tr_n. (the snprintf isn't really POSIX since all strings are null terminated)

Of course using this solution will mean a lot more testing is needed to make sure it is as robust as what rbe did, but it looks like a better solution to me.
The topic has been locked.
More
28 Nov 2013 01:10 #15946 by PhracturedBlue
Replied by PhracturedBlue on topic publishing an intermediate release 3.1.0?
I've committed changes that should be equivalent up to beta-09 (but not including the 'StringReserve' merge. I've replaced all of the tr_n() calls with proper snprintf() instead.
I'll continue moving forward analyzing and committing with the other changes.

Unfortunately, you won't be able to do a 'merge' since I couldn't do a 'pull' on rbe's repo. Until I'm done, I don't recommend rebasing on my repo, as it will just duplicate work.
The topic has been locked.
More
28 Nov 2013 03:21 #15950 by PhracturedBlue
Replied by PhracturedBlue on topic publishing an intermediate release 3.1.0?
I'm just about caught up now.
I've merged everything up to beta15 now except for:
replaced tr_n with proper snprintf implementation
didn't apply 'tempstring' patch
a few other small exceptions I need to go back and look at.

I must say I'm really impressed with the work. I found very few things in your repo that I disagreed with.

One thing I did see:
Please, don't code rules about specific models into the code (ex DEVO6 or DEVO7e). You should instead define new target_def variables when you need to disable something.
The topic has been locked.
  • rbe2012
  • rbe2012's Avatar Topic Author
  • Offline
  • So much to do, so little time...
More
28 Nov 2013 06:51 #15953 by rbe2012
Replied by rbe2012 on topic publishing an intermediate release 3.1.0?

PhracturedBlue wrote: I'm just about caught up now.
I've merged everything up to beta15 now except for:
replaced tr_n with proper snprintf implementation
didn't apply 'tempstring' patch
a few other small exceptions I need to go back and look at.

I must say I'm really impressed with the work. I found very few things in your repo that I disagreed with.

One thing I did see:
Please, don't code rules about specific models into the code (ex DEVO6 or DEVO7e). You should instead define new target_def variables when you need to disable something.


Thanks PB, I tried to do everything in a manner which I expected you can agree with. The tempstring thing was the big exception where I was quite sure it was not the best solution, but it fixed a lot of potential memory issues and this was my priority.

Shall I correct the "#if TXID == ..." things? Or do I better wait some time until your repo settled down and move on from there?
The topic has been locked.
More
28 Nov 2013 06:55 #15954 by vlad_vy
Replied by vlad_vy on topic publishing an intermediate release 3.1.0?
[240] + [30] + [20] + [12] + ... in total will be greater than one buffer [300].

And, once again we will have unexpected reboots with Devo10 and German language.
The topic has been locked.
More
28 Nov 2013 13:42 - 28 Nov 2013 13:54 #15964 by PhracturedBlue
Replied by PhracturedBlue on topic publishing an intermediate release 3.1.0?
Actually the tempstring is still one of the things I just wanted more time to think about.
The original plan was to have the strings in the union so that the addition that Vlad was doing doesn't happen. But you can't do that for the dialog, because you don't want to wipe the structure just because a dialog is displayed.
So we already have a big (80*5 = 400) buffer siting there. Using this everywhere should save memory vs the segmented memory and is more stable.

The _tr_n was something I really didn't like, but as I said I understand why you did it, and you didn't have a proper snprintf to use instead.

Also, I definitely wouldn't recommend running my repo in anything other than an emulator at the moment. Doing things like changing the printf routines requires a lot of testing, otherwise obscure bugs may arise. I want to get a conformance test for that code specifically before I'm confident in it.
Last edit: 28 Nov 2013 13:54 by PhracturedBlue.
The topic has been locked.
Time to create page: 0.102 seconds
Powered by Kunena Forum