issue-#140 Unwrapping IMPORT aliasses

Merged to the master branch
User avatar
Robert
Posts: 1024
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#140 Unwrapping IMPORT aliasses

Post by Robert »

See the diffs: http://redmine.blackboxframework.org/pr ... 65730f0320

This Git stuff is quite exciting - you never know what is going to happen next!
Zinn
Posts: 476
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main
Contact:

Re: issue-#140 Unwrapping IMPORT aliasses

Post by Zinn »

In module DevBrowser there is the yoyo effect between uft8 - str - utf8 in the procedure ShowInterface

GetQualIdent(mod, ident, t);
Kernel.Utf8ToString(mod, modStr, res);
DevReferences.ResolveImportAlias(modStr, t);
Kernel.StringToUtf8(modStr, mod, res);

We should change the procedure ShowInterface back to its 1.7 original version
and after the command GetQualident delete the line CheckModName(mod, t);

How to insert the new functionality?

Just insert into the procedure GetQualident the new line ResolveImportAlias before the translation to utf8.

DevReferences.ResolveImportAlias(s.string, t);
Kernel.StringToUtf8(s.string, mod, res);

The advantage is that the forgotten change in procedure ShowCodeFile is also done via GetQualident.

- Helmut
User avatar
Robert
Posts: 1024
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#140 Unwrapping IMPORT aliasses

Post by Robert »

Seems like a good idea?
Zinn wrote:... the forgotten change in procedure ShowCodeFile ...
Actually I didn't technically forget ShowCodeFile, I ignored it! I did a "Search in Sources" and it is not used, and I couldn't (in 30 seconds) find where it is called, so I gave up looking.
1 - Where is it used? I need to know to check any changes.
2 - Should we consider adding a Menu Command "Search in Rsrc"? Useful options would be to list all files in an installation, or to list / select all Controls in a given Form. "Search in Menus" could also be useful.
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#140 Unwrapping IMPORT aliasses

Post by Josef Templ »

It's probably the simplest and cleanest to reconstruct the branch from zero.
It takes only a few seconds.
The branch on github now has a suspicious Merge commit.
Something has been done that is not straight-forward.

1. Throw away the branch in github. Click on '7 branches', click the trash icon on the branch to remove.
2. Create a new branch with the same name as the removed one.
3. Clone the newly created branch into a new local directory.
4. Copy over the changed files.
5. Make a single commit to the new local repository.
6. Push back the new local repository.

- Josef
User avatar
Robert
Posts: 1024
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#140 Unwrapping IMPORT aliasses

Post by Robert »

I have incorporated Helmut's suggestions, including testing the updated ShowCodeFile Command. This meant creating my own test harness, as I still can't find anywhere where it is currently used.
Josef Templ wrote:It takes only a few seconds.
...
1. Throw away the branch in github. Click on '7 branches', click the trash icon on the branch to remove.
I have spent several times 'a few minutes' and can't find '7 branches'. I need a clue. Is this on my PC, or some web page somewhere?
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#140 Unwrapping IMPORT aliasses

Post by Ivan Denisov »

Robert wrote:... some web page somewhere?
github.png
After you delete this branch you need to update you local repository. However be sure that you backed up the project files for the Josef plan.

I find that this manipulations with cleaning branches very hard. Better someone help you... me or Josef.
User avatar
Robert
Posts: 1024
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#140 Unwrapping IMPORT aliasses

Post by Robert »

I think I have now managed to follow Josef's suggestions. Anyway, the new diff is http://redmine.blackboxframework.org/pr ... 65730f0320
Hopefully nothing got lost on the way.

So, again, ready for test / comment.

Thanks Ivan. I know it is easier for you guys to do this than teach me, but I hope the effort of learning for myself will pay off in the long run. I eventually found that page above:
Browser -> Favorites -> BlackBox Framework Centre -> Issues tracker -> Overview -> https://github.com/BlackBoxCenter/blackbox
There is probably a more direct way?
Last edited by Robert on Fri Nov 11, 2016 8:39 am, edited 1 time in total.
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#140 Unwrapping IMPORT aliasses

Post by Ivan Denisov »

Robert wrote:There is probably a more direct way?
Here it is
links.png
User avatar
Robert
Posts: 1024
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#140 Unwrapping IMPORT aliasses

Post by Robert »

I must have tried 50 links on that page, with names that mean nothing to me like "Gist".

In retrospect I guess it is obvious I should have tried the big blue "blackbox" near the bottom of the page.

Anyway, what do people think about the actual issue here? I have posted a link to the diffs, but there does not seem to be a new "unstable" .zip. The last one is dated 7 November, but the code was updated 10 November. Have I made another process error?
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#140 Unwrapping IMPORT aliasses

Post by Ivan Denisov »

Robert wrote: Have I made another process error?
I studied whats happened... build process sticked. I do not know why.

I just killed the process and it starts again without errors. That's the last build for #140.
http://blackboxframework.org/unstable/i ... a1.732.zip
Post Reply