Re: GtkD Dialog layout

2019-05-15 Thread number via Digitalmars-d-dwt
On Wednesday, 15 May 2019 at 06:35:15 UTC, Vitaly Livshic wrote: Compiles fine, no warnings, but I see only two buttons. GTK shows no warnings. I replace 'packStart' with add but it no effect too. How to add Grid to dialog properly? I don't know dwt, but as a plain gtk program in works

Re: Blog Post #0032 - Menu Accelerator Keys

2019-05-08 Thread number via Digitalmars-d-learn
On Tuesday, 7 May 2019 at 17:41:42 UTC, Ron Tarrant wrote: It always makes me happy when you point out the small stuff. It means I got the big stuff right. :) I do feel a bit pedantic about it too :), on the other hand wrong comments are worse than no comments. I guess you've been away a

Re: Blog Post #0032 - Menu Accelerator Keys

2019-05-07 Thread number via Digitalmars-d-learn
On Friday, 3 May 2019 at 12:12:32 UTC, Ron Tarrant wrote: An accelerating post for a rainy Friday (well, it's raining here, at least) all about menu accelerator keys. Here's the link: http://gtkdcoding.com/2019/05/03/0032-accelerator_keys.html some end block comments need update: class

Re: Blog Post #0033 - Faking an ImageMenuItem with an AccelKey

2019-05-07 Thread number via Digitalmars-d-learn
On Tuesday, 7 May 2019 at 09:39:55 UTC, Ron Tarrant wrote: But the result is today's post: how to produce a MenuItem with an image AND and AccelKey. Here's the link: http://gtkdcoding.com/2019/05/07/0033-fake_image_menu_and_accel.html Thanks! the github link links to file .._16_.. from

Re: srand time error uint/long

2019-04-29 Thread number via Digitalmars-d-learn
On Monday, 29 April 2019 at 14:39:29 UTC, rikki cattermole wrote: float f = uniform01(); Its already initialized on module load. If you do want to custom seed it, you'll probably want to cast the seed to uint instead and have your own instance of the random number generator. On Monday, 29

srand time error uint/long

2019-04-29 Thread number via Digitalmars-d-learn
How to call srand() with time()? ``` void main() { import core.stdc.stdlib : rand, srand; import core.stdc.time : time; srand(time(null)); } ``` Error: function core.stdc.stdlib.srand(uint seed) is not callable using argument types (long) cannot pass argument time(null) of type

Re: gtkDcoding Blog: Post #0030 - A More Practical RadioMenuItem Example

2019-04-27 Thread number via Digitalmars-d-learn
On Friday, 26 April 2019 at 11:14:23 UTC, Ron Tarrant wrote: Once again it's Friday and a new blog post is up. And just a room at the Hotel California (any time of year) you can find it here: http://gtkdcoding.com/2019/04/26/0030-radiomenuitem-practical.html There are links to the previous

Re: Retrieving Column Data from a ListStore?

2019-04-25 Thread number via Digitalmars-d-learn
On Thursday, 25 April 2019 at 15:16:03 UTC, Ron Tarrant wrote: On Thursday, 25 April 2019 at 11:29:04 UTC, number wrote: I'm trying to do it with multi-selection. It works now but I wonder if it's right to just create a dummy TreeModelIF to call getSelectedRows()? Same question for creating a

Re: GTK Scale/Volume Buttons Show Muted Icon on Startup

2019-04-25 Thread number via Digitalmars-d-learn
On Thursday, 25 April 2019 at 11:36:26 UTC, Ron Tarrant wrote: When running this example of a VolumeButton, ... When using `setValue(initialValue)` after `setAdjustment()` the scale seems have the correct value. If in addition the Adjustment is created with an initial value different from

Re: Retrieving Column Data from a ListStore?

2019-04-25 Thread number via Digitalmars-d-learn
On Wednesday, 24 April 2019 at 18:56:50 UTC, Ron Tarrant wrote: For anyone else who comes along looking for the same answer, here's what I did: I'm trying to do it with multi-selection. It works now but I wonder if it's right to just create a dummy TreeModelIF to call getSelectedRows()?

Re: gtkDcoding Blog Post # 29 - RadioMenuItems

2019-04-24 Thread number via Digitalmars-d-learn
On Tuesday, 23 April 2019 at 20:40:45 UTC, Ron Tarrant wrote: On Tuesday, 23 April 2019 at 12:21:37 UTC, number wrote: Hi, thanks! little typo: RadioMeniItem How about that? The typo was in the article, not the code. Makes for a change. :) Thanks for catching, number. Are your original

Re: gtkDcoding Blog Post # 29 - RadioMenuItems

2019-04-23 Thread number via Digitalmars-d-learn
On Tuesday, 23 April 2019 at 09:44:12 UTC, Ron Tarrant wrote: Now that we've got Easter out of the way, it's time for another gtkDcoding blog post: http://gtkdcoding.com/2019/04/23/0029-radiomenuitem.html Hi, thanks! little typo: RadioMeniItem

Re: gtkDcoding Blog Post # 28 - Menu II - CheckMenuItem

2019-04-19 Thread number via Digitalmars-d-learn
On Friday, 19 April 2019 at 12:12:28 UTC, Ron Tarrant wrote: Even though it's Good Friday, there's still a new blog post. As the thread title says, it's about using the CheckMenuItem, two examples this time. You can find it here: http://gtkdcoding.com/2019/04/19/0028-checkmenuitems.html

Re: gtkDcoding Blog Post # 26 - Menu Basics

2019-04-14 Thread number via Digitalmars-d-learn
On Saturday, 13 April 2019 at 12:42:36 UTC, Ron Tarrant wrote: On Saturday, 13 April 2019 at 09:49:47 UTC, number wrote: On Saturday, 13 April 2019 at 00:25:21 UTC, Ron Tarrant wrote: I'm asking because ... the messagebox sized itself to the shorter text in the content area. They said it's an

Re: gtkDcoding Blog Post # 26 - Menu Basics

2019-04-13 Thread number via Digitalmars-d-learn
On Saturday, 13 April 2019 at 00:25:21 UTC, Ron Tarrant wrote: On Friday, 12 April 2019 at 13:56:51 UTC, number wrote: Are you planning to cover messagebox-like stuff (i.e. gtkdialog.. i guess?) Yes. Right after this series on menus, I start on Dialogs. The first couple of those are already

Re: gtkDcoding Blog Post # 26 - Menu Basics

2019-04-12 Thread number via Digitalmars-d-learn
On Friday, 12 April 2019 at 09:05:11 UTC, Ron Tarrant wrote: Today starts a series on GtkD menus. Over the next four weeks, we'll cover enough ground to get you up-n-running with most menu-related topics. And it all starts right here: http://gtkdcoding.com/2019/04/12/0026-menu-basics.html

Re: gtkDcoding Blog Post for 2019-03-29 - Grid

2019-04-02 Thread number via Digitalmars-d-learn
On Tuesday, 2 April 2019 at 11:31:39 UTC, Ron Tarrant wrote: Today's the day for (yet) another blog post over on gtkDcoding.com and the subjects are: - the RadioButton, and - the ColorButton. You can find it here: http://gtkdcoding.com/2019/04/02/0023-radio-and-color-buttons.html Thank

Re: gtkDcoding Blog Post for 2019-03-29 - Grid

2019-03-30 Thread number via Digitalmars-d-learn
On Friday, 29 March 2019 at 14:25:16 UTC, Ron Tarrant wrote: There's a new tutorial for using a GTK Grid. You can find it here: http://gtkdcoding.com/2019/03/29/0022-grids.html Thanks! The first link in the blog post to '..the last blog post' links to the 0022 article itself, not to a

Re: Another Tuesday (Friday?), Another GtkDcoding Blog Post

2019-03-26 Thread number via Digitalmars-d-learn
On Sunday, 24 March 2019 at 19:20:47 UTC, Ron Tarrant wrote: Sunday Blog eXtra: Installing and Using a Linux Build Environment URL: http://gtkdcoding.com/2019/03/24/x0002-gtkd-in-a-linux-environment.html Thanks for the new posts. Link dead? It's also not listed on the blog post list. But I

design question, gtkd object interdependence

2019-03-25 Thread number via Digitalmars-d-learn
I have a design question about (i guess) object interdependence using gtkd. There is an application class which sets its property mAppWin. The app is passed as an argument to the window constructor. During the window constructor a scale (trackbar) is created which also receives and stores an

Re: Another Tuesday (Friday?), Another GtkDcoding Blog Post

2019-03-23 Thread number via Digitalmars-d-learn
On Friday, 22 March 2019 at 23:34:08 UTC, Ron Tarrant wrote: It's fixed now. The first one :), now there's still the other one "Here’s a second code file for you."

Re: Another Tuesday (Friday?), Another GtkDcoding Blog Post

2019-03-22 Thread number via Digitalmars-d-learn
On Tuesday, 19 March 2019 at 12:33:08 UTC, Ron Tarrant wrote: Tuesday again. This blog post is about invisible Entry widgets and the FontButton. Really stimulating stuff and you'll find it at: http://gtkdcoding.com/2019/03/19/0019-disappearing-text-entry.html A little copy/paste glitch..

Re: Another Tuesday (Friday?), Another GtkDcoding Blog Post

2019-03-22 Thread number via Digitalmars-d-learn
On Tuesday, 12 March 2019 at 14:44:59 UTC, Ron Tarrant wrote: As a side note, in 0004 you say: We can still call the constructor, even though strictly speaking it’s private, because by using ‘new MyButton()’ the constructor isn’t being called directly, but as part of a lower-level process

Re: Another Tuesday (Friday?), Another GtkDcoding Blog Post

2019-03-22 Thread number via Digitalmars-d-learn
On Friday, 22 March 2019 at 11:19:56 UTC, Ron Tarrant wrote: Hmm... I'm not sure why the links didn't show up for you. I just double-checked and they're in the .md file and version of the file has been in place for at least 10 days. Still, no harm in having them on this forum as well. Thanks

Re: Another Tuesday (Friday?), Another GtkDcoding Blog Post

2019-03-22 Thread number via Digitalmars-d-learn
On Tuesday, 12 March 2019 at 14:44:59 UTC, Ron Tarrant wrote: another post on the gtkDcoding blog. 0013 says ... with *setTooltipText()*. Maybe a formatting error? Thanks again for the Blog. FYI: I also had dropped a note in some of the previous gtkdcoding forum threads

Re: Another Tuesday (Friday?), Another GtkDcoding Blog Post

2019-03-21 Thread number via Digitalmars-d-learn
On Tuesday, 12 March 2019 at 14:44:59 UTC, Ron Tarrant wrote: another post on the gtkDcoding blog. 0010 says Here’s the code file. Here’s a second code file for you. but no links. I guess it's https://github.com/rontarrant/gtkDcoding/blob/master/003_box/box_003_03_checkbutton.d and

Re: gtkDcoding Blog Post #0007 Now Live

2019-03-21 Thread number via Digitalmars-d-announce
The 0007 github code doesn't compile. button_002_05_release.d(40): Error: undefined identifier buttonCaption buttonCaption is now defined (and unused) in the button class but still used in the window class and the button constructor still uses the label argument.

Re: gtkDcoding Blog Post #0007 Now Live

2019-03-21 Thread number via Digitalmars-d-announce
On Wednesday, 6 February 2019 at 13:28:14 UTC, Ron Tarrant wrote: I forgot to do this yesterday (the announcement, not the post) so I'm doing it now. It's not so much about pressing buttons as it is releasing them (which conjures images of a catch-n-release mouse trap, but that's another

Re: gtkDcoding Blog Post #0007 Now Live

2019-03-21 Thread number via Digitalmars-d-announce
On Thursday, 21 March 2019 at 14:18:56 UTC, number wrote: Little typo at '* returns on value,'? should be 'no value' i guess? I'm referring to 0006

Re: gtkDcoding Blog Post #0007 Now Live

2019-03-21 Thread number via Digitalmars-d-announce
On Wednesday, 6 February 2019 at 13:28:14 UTC, Ron Tarrant wrote: I forgot to do this yesterday (the announcement, not the post) so I'm doing it now. It's not so much about pressing buttons as it is releasing them (which conjures images of a catch-n-release mouse trap, but that's another

Re: GtkD Blog Post #0005 Now Live

2019-03-21 Thread number via Digitalmars-d-announce
On Tuesday, 29 January 2019 at 21:00:10 UTC, Ron Tarrant wrote: Another blog post available at http://gtkdcoding.com Enjoy! Thank you for these tutorials! Just want to mention that the code on the page (0005) is not in sync with the one on github. In the else branch, the former uses

Re: DSFML linking fails

2018-12-24 Thread number via Digitalmars-d-learn
On Monday, 24 December 2018 at 10:08:25 UTC, Dmitriy wrote: Hello. I'm using https://github.com/Jebbs/DSFML library ... The problem when I build my project using these libraries. The problem in linking: Did you look at http://dsfml.com/docs/firstprogram.html ? I remember having to link

Re: dlang feed, thunderbird

2018-05-24 Thread number via Digitalmars-d
On 24.05.2018 17:38, Vladimir Panteleev wrote: On Thursday, 24 May 2018 at 15:14:11 UTC, number wrote: are the mlOnly ones like 'phobos' accessible, since they are public via the forum?  tried with server lists.puremagic.com but didn't work. To access mailing lists with an email/news client,

Re: dlang feed, thunderbird

2018-05-24 Thread number via Digitalmars-d
On 24.05.2018 16:20, Vladimir Panteleev wrote: This file is the source of truth for the forum.dlang.org mappings: https://github.com/CyberShadow/DFeed/blob/master/config/gengroups.d are the mlOnly ones like 'phobos' accessible, since they are public via the forum? tried with server

Re: dlang feed, thunderbird

2018-05-24 Thread number via Digitalmars-d
On 24.05.2018 16:13, Ali Çehreli wrote: On 05/24/2018 06:36 AM, number wrote: > On Wednesday, 23 May 2018 at 18:50:37 UTC, Ali Çehreli wrote: > How do the newsgroups match to the forum categories (on the left here in > the forum), or specifically, what is the newsgroup for 'general' for >

Re: dlang feed, thunderbird

2018-05-24 Thread number via Digitalmars-d
On 24.05.2018 16:13, Ali Çehreli wrote: On 05/24/2018 06:36 AM, number wrote: > On Wednesday, 23 May 2018 at 18:50:37 UTC, Ali Çehreli wrote: > How do the newsgroups match to the forum categories (on the left here in > the forum), or specifically, what is the newsgroup for 'general' for >

Re: dlang feed, thunderbird

2018-05-24 Thread number via Digitalmars-d
On Wednesday, 23 May 2018 at 18:50:37 UTC, Ali Çehreli wrote: I don't think I'm using "feeds" with Thunderbird. Instead, I have an NNTP "account" in Thunderbird: www.digitalmars.com port: 119 Once that account was added, I had "subscribed" to some of the newsgroups. Thanks, that

dlang feed, thunderbird

2018-05-23 Thread number via Digitalmars-d
I don't get any posts for this forum in Thunderbird since today. It worked previously. the URL : https://forum.dlang.org/feed/posts works in Firefox, but creating a new account and subscription in Thunderbird he says 'The Feed URL is not a valid feed' and the validation link gets me here:

Re: toString contains null for struct with function/method

2018-04-09 Thread number via Digitalmars-d-learn
On Sunday, 8 April 2018 at 15:51:05 UTC, Paul Backus wrote: On Sunday, 8 April 2018 at 15:04:49 UTC, number wrote: writeln(s2);// S2(0, null) S2 is a nested struct [1], which means it has a hidden pointer field that's used to access its enclosing scope. If you change

toString contains null for struct with function/method

2018-04-08 Thread number via Digitalmars-d-learn
the write() shows a 'null' if the struct has a function/method. why is that? ``` import std.stdio; void main() { struct S { int i; } S s; writeln(s);// S(0) writeln(typeid(s).sizeof); // 8 struct S2

Re: dmd segmentation fault with duplicate class definition

2018-03-30 Thread number via Digitalmars-d
On Thursday, 29 March 2018 at 21:18:02 UTC, Seb wrote: On Thursday, 29 March 2018 at 20:48:47 UTC, number wrote: I'm learning, so no idea if this is known or what causes the segfault. [...] Always try the latest release when you run into an ICE - chances are very good that it already has

dmd segmentation fault with duplicate class definition

2018-03-29 Thread number via Digitalmars-d
I'm learning, so no idea if this is known or what causes the segfault. Linux DMD64 D Compiler v2.078.3 ``` void main() { import std.stdio; { class C { int i; } } {

Re: get classname in static member

2018-03-28 Thread number via Digitalmars-d-learn
On Wednesday, 28 March 2018 at 10:10:19 UTC, Simen Kjærås wrote: So to get the class name you'd generally use typeof(this).stringof. ... And could somebody explain to me why 'typeid(this).stringof' is returning 'typeid(this)'? Because that's what you're asking for. :p typeid returns the

get classname in static member

2018-03-28 Thread number via Digitalmars-d-learn
Is there a way to get the classname without specifying the class in the first place as required by classinfo and fullyQualifiedName? extracting it from __FUNCTION__ wouldn't work outside a function, i.e. for a classfield, and 'this' doesn't work in static members. It's just about simple

Re: Need example of usage DerelictPQ

2018-03-21 Thread number via Digitalmars-d-learn
On Wednesday, 24 December 2014 at 11:56:40 UTC, Suliman wrote: Could anybody provide any simple examples of usage DerelictPQ. I do not have experience of C, and I can't understand how to use this driver. I need just basics like connect, select and insert.

Re: How do you get comfortable with Dlang.org's Forum?

2018-02-24 Thread number via Digitalmars-d
On Friday, 23 February 2018 at 14:25:55 UTC, psychoticRabbit wrote: If there is one change that I would really like, it's dark theme I used to use Firefox Addon 'Colour That Site!' but its not available for current Firefox version. Today the built-in Reader Mode might just do it (click the

Re: unable to fork: Cannot allocate memory / core.checkedint / gtkd

2018-02-14 Thread number via Digitalmars-d-learn
On Tuesday, 13 February 2018 at 21:46:31 UTC, Stefan Koch wrote: On Tuesday, 13 February 2018 at 14:10:44 UTC, number wrote: Ok, thanks for the info. I guess I'll just use printf then for larger enums. To get the same convince you can use. the enumToString from:

Re: unable to fork: Cannot allocate memory / core.checkedint / gtkd

2018-02-13 Thread number via Digitalmars-d-learn
On Tuesday, 13 February 2018 at 12:32:58 UTC, Stefan Koch wrote: On Tuesday, 13 February 2018 at 12:17:31 UTC, number wrote: I just tried again. compiling the following code eats up my 4GB of RAM and fails. Please copy the enumeration from:

Re: unable to fork: Cannot allocate memory / core.checkedint / gtkd

2018-02-13 Thread number via Digitalmars-d-learn
On Sunday, 11 February 2018 at 15:05:26 UTC, number wrote: On Sunday, 11 February 2018 at 13:17:13 UTC, number wrote: unable to fork: Cannot allocate memory if i comment-out the line.. writeln(GdkKeysyms.GDK_Escape); then it compiles/links/runs fine. I just tried again. compiling the

Re: unable to fork: Cannot allocate memory / core.checkedint / gtkd

2018-02-11 Thread number via Digitalmars-d-learn
On Sunday, 11 February 2018 at 13:17:13 UTC, number wrote: unable to fork: Cannot allocate memory if i comment-out the line.. writeln(GdkKeysyms.GDK_Escape); then it compiles/links/runs fine. [...] I actually want to close the application if escape key is pressed with if (eventKey.keyval

unable to fork: Cannot allocate memory / core.checkedint / gtkd

2018-02-11 Thread number via Digitalmars-d-learn
I get dmd ouput: "unable to fork: Cannot allocate memory" when compiling the following code: import std.stdio; import gio.Application : GioApplication = Application; import gtk.Application; import gtk.ApplicationWindow; import gtk.Widget; import gdk.Keysyms; int main(string[] args) {

dirEntries returns relative, not absolute paths

2018-02-06 Thread number via Digitalmars-d-learn
https://dlang.org/phobos/std_file.html#dirEntries The name of each iterated directory entry contains the absolute path. it seems to be absolute only if the specified path is absolute, or always relative to the parent dir of the specified path. import std.stdio;import std.stdio; void main()