Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Jean

Pages: 1 ... 66 67 [68] 69 70 ... 72
Astrobasic / Re: How to handle multiple windows in a script?
« on: August 21, 2020, 09:14:54 PM »
Yes but in fact you can achieve the same with a plain menu, and have even more screenspace. Strictly speaking it's only a bigger sized menu. :)

Astrobasic / Re: How to handle multiple windows in a script?
« on: August 21, 2020, 02:52:57 PM »
I've added an example of a tabbed interface to the templates in the editor. You can mix it with canvas() if you fancy.
You could of course just as well make a main menu with the the same functions beside Close, it's just a user interface thing.
Multiple windows is not easy, have to keep track where the output goes, which windows are open etc and there are already some extra windows like grid().
Code: [Select]
window(800, 600);
menu(0, "Close", close);
char tabs[3][9]= "1", "2", "3", x;
tab(tabs, tabchange);

group(1);                   ` 0 is default group, these belong to group 1
button(33, 33, "Hi", NULL);
label(33, 99, "Hi world");

group(2);                        ` these belong to group 2
checkbox(33, 33, "x", x, NULL);

group(3);                         ` these belong to group 3
edit(33, 33, 99, tabs[0], NULL);

@tabchange;                       ` call it by hand the very first time, tabnumber is still 0

  command(GROUP, -1, tabnumber + 1, 0); ` set group tabnumber + 1 active (tabnumber is zero based, groups start at 1)
  fill(0, 0, width, height, -2);        ` clear previous grafix output
  switch (tabnumber)
    :0; @dofirst; break;
    :1; @dosecond; break;
    :2; @dothird; break;

  line(0, 0, width, height, RED);

  circle(99, 99, 66, BLUE);

  box(0, 0, width, height, PURPLE, 2);


Astrobasic / Re: How to handle multiple windows in a script?
« on: August 21, 2020, 09:09:36 AM »
So great to see discussion about ab here!!

A canvas can't hold controls, hence the name, only for painting.

A window with tabs can hold controls and you can put different controls on each tab, like Ed says an example is c:\planetdance\system\extra settings.ab
The script is a bit big though. Also it only puts the controls on each tab when it's selected, which makes it more complicated.

It makes use of some commands like group() to group controls.
In the tabchange label, which gets called on every tab click you see:
command(GROUP, -1, tabnumber + 1, 0);
This makes the controls from one group visible and hides the rest. There is an init() function that puts the controls on a window if needed.
See also the docs on group()
If you're stuck with that example say so, maybe it needs more documentation.

There's also c:\planetdance\ab\horoscope\extra\Wva.ab, it's much simpler because only one tab has controls.

EDIT: gonna make an working tab example and add it to the templates function.

If you have programming knowledge take a look at c:\planetdance\ab\Excel.ab, it im/exports to/from .csv files.
Maybe you can start with Application - Edit, give your script a name, now you have an empty window, do in the editor application - templates and use 'horoscope', that will give you something to start with.

Planetdance for windows / Re: Domitude
« on: August 18, 2020, 11:41:55 PM »
great to see, thanks.

Planetdance for windows / Re: Some small anomalies or bugs
« on: August 18, 2020, 07:20:09 PM »
I suspect that bug is wine-only, those 'labels' are set to 'autosize' and wine has trouble doing it. Can't do much about this, sorry.
The installer is needed to register the planetdance.ttf font in windows, the list functions all make use of that font, that's really the only thing the installer is needed for.

Planetdance for windows / Re: Some small anomalies or bugs
« on: August 18, 2020, 05:55:12 PM »
Hi Jeremy,

If they are not too small, go ahead. Did that install on Mac go easy? I could redirect questions for installing wine on Mac to this forum too.

Planetdance for windows / Re: Whole Sign Houses change
« on: August 17, 2020, 10:18:18 PM »
Hi Kyle,

August 17
+ Added Options - Extra - General - Horizontal Ascendant in Whole Sign Houses

Fresh code, be alert for bugs :)

Planetdance for windows / Links
« on: August 17, 2020, 10:12:18 PM »
I'm gonna collect links to planetdance for windows here.
Great video from Zagata


Astrobasic / Re: string length bug?
« on: August 16, 2020, 07:48:35 AM »
Hi Ed,
strset() only throws errors if the number of arguments given/provided don't match, if the target string is too small, it just quits, no errors.
In this case, because there are no arguments, strcpy will do fine:

Code: [Select]
strcpy(s, "Planetary hour ruler and ascendant both cold and dry - melancholic");
However strcpy() also has no error checking at all and if you assign a too wide string it will happily overwrite other vars. This is done for speed, it's more or less assumed that the programmer knows she can't put 10 chars in a 5 char array. So i could add the check to strset() but then i would have to do it for other functions like strcpy() too, and i don't like to do that, more code, less speed. In this way, ab is a dangerous language, just like c / c++, it will overwrite memory if you are not careful.

Planetdance for windows / Re: Azimuth
« on: August 15, 2020, 05:14:36 PM »
August 15
+ Added Options - Extra - General - Azimuth South to North.

Planetdance for windows / Re: Azimuth
« on: August 14, 2020, 07:25:14 AM »
If you look at horoscope - extra - compass you see a choice between north / south which i added after a lot of protest from people. It seems half the astrologers are used to the south and the other to the north approach. It's not difficult to add such a switch to horoscope - data, however i wonder if a global option would be better, i'll give it some thought.

Astroclock / Re: version history
« on: August 11, 2020, 05:49:32 PM »
August 10
+ Added option to set distance between wheel and column.
August 11
- Timezone was not working, ascendant was wrong.
August 12
+ Every control in the Options window now has immediate effect, no need to click Apply anymore.

Je kan een reset doen met Bestand - Herstel. Dan wordt pd herstart met alle standaard instellingen.

Maar als er geen aspecten zijn kan dat liggen aan de instellingen in opties - planeten / aspecten (bij jou all-asp.pa1) of in opties - orbs (bij jou default.orb), je zou daar eens kunnen kijken of je wat vreemds ziet. Het zou uit moeten zien zoals op de plaatjes.

De icoontjes waarmee je snel van instelling kan wisselen kan je natuurlijk ook proberen, maar bij genoemde opties zie je ook welke waardes dat zijn, als daar planeten ontbreken. Zie ook de help aldaar.

Planetdance for windows / Re: Options - Extra - Column - Almutens
« on: August 06, 2020, 07:46:28 AM »
Sorry. Can you post a pic?

Pages: 1 ... 66 67 [68] 69 70 ... 72