Re: D-oriented Syntax Highlighting Plugin for WordPress?

2019-01-01 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 1 January 2019 at 20:43:13 UTC, Adam D. Ruppe wrote: Realistically, if you use Java or C++ highlighting, it will look plenty good enough for D too. Yeah, I was thinking that. I'd imagine it would be missing a few keywords, though. So take a look down my highlight test page for

D-oriented Syntax Highlighting Plugin for WordPress?

2019-01-01 Thread Ron Tarrant via Digitalmars-d-learn
I've found a ton of syntax highlighter plugins for WordPress, but none that admit to supporting D. Anyone know of one? Or, short of that, perhaps a different site build/management tool (read: not WordPress) with decent D syntax highlighting... Or, one that can be adapted without rolling my

Re: D-oriented Syntax Highlighting Plugin for WordPress?

2019-01-01 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 1 January 2019 at 15:36:11 UTC, rjframe wrote: I use SilverStripe instead of Wordpress, but if WordPress uses TinyMCE you can use the codesample plugin[0] with PrismJS[1], which does support D (though I don't know if it actively gets updates). [0]:

Re: D-oriented Syntax Highlighting Plugin for WordPress?

2019-01-01 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 1 January 2019 at 18:32:24 UTC, Andre Pany wrote: If your reason for not choosing WordPress is related to security concerns you could also consider this approach. Not so much a security concern, I'm just looking for the path of least resistance. If that's WP, that's fine, but if

Re: D-oriented Syntax Highlighting Plugin for WordPress?

2019-01-01 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 1 January 2019 at 17:09:51 UTC, rjframe wrote: I started using SilverStripe 7 or 8 years ago, and have never had a reason to look for anything else. It doesn't have the ecosystem of WordPress and never seemed to get much following outside New Zealand, but it's well- designed and

Re: D-oriented Syntax Highlighting Plugin for WordPress?

2019-01-01 Thread Ron Tarrant via Digitalmars-d-learn
And while we're on the subject, a couple of related questions: 1) I'm currently using AgilityHoster which gives me a free site and $18/year domain registration. Any better deals out there without sacrificing UX? 2) Anyone have experience with Github Pages? 3) Or if anyone cares to share

Re: D-oriented Syntax Highlighting Plugin for WordPress?

2019-01-01 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 1 January 2019 at 18:07:22 UTC, Neia Neutuladh wrote: I believe I use Enlighter for that: https://wordpress.org/plugins/enlighter/ Did you have to massage it? I don't see D in its list of supported languages.

Re: D-oriented Syntax Highlighting Plugin for WordPress?

2019-01-01 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 1 January 2019 at 18:10:49 UTC, Mike Parker wrote: We're using Mivhak Syntax Highlighter on the D Blog. OOTB, or...? I couldn't find a list of supported languages.

Re: imports in a Separate File?

2018-12-11 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 11 December 2018 at 15:39:18 UTC, Steven Schveighoffer wrote: Use public imports in your header file. This will pretend that the symbols imported reside in the module itself. i.e. inside importedStuff.d: public { // 120 import statements } -Steve Thanks, Steve. Works like

imports in a Separate File?

2018-12-11 Thread Ron Tarrant via Digitalmars-d-learn
I ran across a code example (https://github.com/gtkd-developers/GtkD/blob/master/demos/gtkD/TestWindow/TestWindow.d) in which the first ~120 lines are mostly import statements. And it got me wondering... I tried to off-load a bunch of imports into a pseudo-header file — importedStuff.d — and

Re: Doubt about this book: The D Programming Language

2018-12-17 Thread Ron Tarrant via Digitalmars-d-learn
On Monday, 17 December 2018 at 15:32:37 UTC, Adam D. Ruppe wrote: There's a few minor changes in mine (the D Cookbook one), and a few typos in the book I didn't catch until too late that mean some examples won't literally compile anyway, but they are all quite small. Are these typos

Re: Doubt about this book: The D Programming Language

2018-12-18 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 18 December 2018 at 01:16:54 UTC, Adam D Ruppe wrote: They're obvious. Stuff like doubled ; at the end of lines in code samples, or curly quotes when they should be straight. (They are the result of me fighting Microsoft Word and the review process with the publisher.) A few

Some Fundamental Paradigm Questions

2018-12-21 Thread Ron Tarrant via Digitalmars-d-learn
Reading through an abstract of what makes the D language tick, I found terms like mixins and templates, concepts I haven't run across in the other languages I've learned. I have a basic understanding of WHAT mixins and templates are, but what I don't understand is WHY they're part of the

Re: Some Fundamental Paradigm Questions

2018-12-22 Thread Ron Tarrant via Digitalmars-d-learn
Thanks, Dennis and H.S. for the well-thought-out and comprehensive replies.

Re: How do you get mouse movement info in GtkD?

2018-12-27 Thread Ron Tarrant via Digitalmars-d-learn
On Saturday, 30 January 2016 at 06:43:11 UTC, Enjoys Math wrote: There's also one that takes an Event param, but there's no obvious way to get the x/y info from that so I'll just use this lower level one which seems to work. I know this post is old, but a search I did the other day brought

Re: Where do I learn to use GtkD

2018-12-23 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 30 October 2018 at 04:22:21 UTC, helxi wrote: On Sunday, 13 March 2016 at 19:28:57 UTC, karabuta wrote: Gtk3 from python3 has got I nice book with examples that are not so advanced but enough to get you doing real work(from a beginner point of view). GtkD seem to have changed the

Re: Mysteries of the Underscore

2018-12-24 Thread Ron Tarrant via Digitalmars-d-learn
On Monday, 24 December 2018 at 11:30:31 UTC, Johan Engelen wrote: The underscore is just an identifier but nothing special, it could be any valid identifier like "ldkhfksdkdsg". -Johan Thanks, Johan. In a way, I was hoping it was some kind of underscore magic. Now my brain hurts.

Mysteries of the Underscore

2018-12-24 Thread Ron Tarrant via Digitalmars-d-learn
I found a mention that in the definition of a delegate, a function parameter and its type could be replaced by an underscore: myTestRig.addOnDestroy(delegate void(Widget w) { quitApp(); } ); became: myTestRig.addOnDestroy(delegate void(_) { quitApp(); } ); I was trying to find some further

Imports and Subfolders and Links (Oh, My!)

2018-12-07 Thread Ron Tarrant via Digitalmars-d-learn
Trying to wrap my brain around imports, etc. In various places around the Internet, I've read that if I have modules in a subfolder/subdirectory, my import statement would look like this: import subfolder.ModuleName; And in the module files, the first statement is: module ModuleName;

Re: Imports and Subfolders and Links (Oh, My!)

2018-12-07 Thread Ron Tarrant via Digitalmars-d-learn
On Friday, 7 December 2018 at 16:43:02 UTC, Adam D. Ruppe wrote: That's wrong: the import name and the module name should always match, in full, including all the dot parts. So if you "import app.modulename;", the other file must have "module app.modulename;" Okay. I guess the instructions

Re: Imports and Subfolders and Links (Oh, My!)

2018-12-07 Thread Ron Tarrant via Digitalmars-d-learn
So, the upshot of it all seems to be that the -i's have it.

Re: D-oriented Syntax Highlighting Plugin for WordPress?

2019-01-02 Thread Ron Tarrant via Digitalmars-d-learn
On Wednesday, 2 January 2019 at 02:09:11 UTC, Mike Parker wrote: It supports D out of the box. Thanks, Mike. Once I downloaded it and dug around, I found the list of supported languages. Odd they don't list these on the about page or wherever.

Re: Mysteries of the Underscore

2019-01-02 Thread Ron Tarrant via Digitalmars-d-learn
On Monday, 24 December 2018 at 16:53:57 UTC, Neia Neutuladh wrote: I once, in my callow days, wrote a unittest with variables named _, __, ___, etc. It did not pass code review, but it did amuse.

Re: Imports and Subfolders and Links (Oh, My!)

2018-12-09 Thread Ron Tarrant via Digitalmars-d-learn
Thanks everyone.

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

2019-04-02 Thread Ron Tarrant via Digitalmars-d-learn
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

gtkDcoding Blog Post for 2019-03-29 - Grid

2019-03-29 Thread Ron Tarrant via Digitalmars-d-learn
I'm having trouble replying to the thread I usually use, so... There's a new tutorial for using a GTK Grid. You can find it here: http://gtkdcoding.com/2019/03/29/0022-grids.html

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

2019-04-02 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 2 April 2019 at 14:13:09 UTC, number wrote: Thank you! You're welcome. :) The function ignores its argument and always uses member variable button2 instead. Changing the parameter type to MyRadioButton and using 'button' instead of 'button2' in the body works, so you could pass

gtkDcoding Blog Extra: Installation and Usage of D Development Environment - Linux

2019-03-31 Thread Ron Tarrant via Digitalmars-d-learn
Last Sunday, I posted this blog extra, but two of our compatriots here on the D forum pointed out a host of errors and typos. So, after a rewrite and a technical review by none other than Mike Wey, I believe this is now about as accurate as it can be. You can find it here:

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

2019-03-26 Thread Ron Tarrant via Digitalmars-d-learn
Tuesday, March 26, 2019 And today's blog post covers creating a Label with a non-default background colour. You can find it here: http://gtkdcoding.com/2019/03/26/0021-labels-with-background-colors-markup.html

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

2019-03-22 Thread Ron Tarrant via Digitalmars-d-learn
On Friday, 22 March 2019 at 16:40:31 UTC, number wrote: writeln("The text entry box holds: ", fontButton.getFontName()); Again, thank you for catching typos.

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

2019-03-22 Thread Ron Tarrant via Digitalmars-d-learn
On Friday, 22 March 2019 at 13:17:23 UTC, number wrote: Not sure about .md or file version, but there are no links in the actual blog post: http://gtkdcoding.com/2019/02/15/0010-checkbutton.html It's fixed now. and apparently also not in in this .md file:

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

2019-03-22 Thread Ron Tarrant via Digitalmars-d-learn
On Friday, 22 March 2019 at 13:58:48 UTC, number wrote: I think it works in this scenario because private in D works on the module/file level. By gar, you're right. I hadn't even looked into this because I assumed it was the same as PHP and C++. Thanks for pointing this out.

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

2019-03-24 Thread Ron Tarrant via Digitalmars-d-learn
On Saturday, 23 March 2019 at 07:18:02 UTC, number wrote: The first one :), now there's still the other one "Here’s a second code file for you." Done. Thanks, eh.

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

2019-03-24 Thread Ron Tarrant via Digitalmars-d-learn
Sunday Blog eXtra: Installing and Using a Linux Build Environment URL: http://gtkdcoding.com/2019/03/24/x0002-gtkd-in-a-linux-environment.html

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

2019-04-03 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 2 April 2019 at 18:27:10 UTC, Mike Wey wrote: While that would be true for things that live on the stack, this is not the case for RGBA. The C version of getRgba uses the "out" parameter so you can pass in a existing GdkRgba, even tough that would make it more like ref. This

gtkDcoding Blog: Post #0024 - Switch and LightSwitch

2019-04-05 Thread Ron Tarrant via Digitalmars-d-learn
Since the forum seems to have trouble with replies to existing posts, for now I'll be doing a separate post for each. Hope that doesn't get anyone's nose out of joint. Anyway... Today we explore the GTK Switch widget with two examples, a simple one and a complex one. Enjoy.

Re: gtkDcoding Blog: Post #0024 - Switch and LightSwitch

2019-04-05 Thread Ron Tarrant via Digitalmars-d-learn
On Friday, 5 April 2019 at 13:44:35 UTC, Ron Tarrant wrote: Since the forum seems to have trouble with replies to existing posts, for now I'll be doing a separate post for each. Hope that doesn't get anyone's nose out of joint. Anyway... Today we explore the GTK Switch widget with two

Re: gtkDcoding Blog: Post #0024 - Switch and LightSwitch

2019-04-05 Thread Ron Tarrant via Digitalmars-d-learn
On Friday, 5 April 2019 at 14:05:55 UTC, Russel Winder wrote: I get the feeling this blog is going to become an important tutorial resource for people wanting to do GtkD stuff with D. Given D and GtkD is currently the best way of writing Gtk+ applications, this blog is a great resource.

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

2019-03-29 Thread Ron Tarrant via Digitalmars-d-learn
On Friday, 29 March 2019 at 16:21:59 UTC, aberba wrote: Have shared gtkdcoding.com with some folks and they like it, keep it coming!! Cool. Thanks, aberba.

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

2019-03-29 Thread Ron Tarrant via Digitalmars-d-learn
On Friday, 29 March 2019 at 20:34:32 UTC, Michelle Long wrote: I really wish you would start taking screenshots! It is not hard! You still think this is about me not knowing how to take a screenshot? :) I guess you didn't read my reply to your last request.

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

2019-03-30 Thread Ron Tarrant via Digitalmars-d-learn
On Saturday, 30 March 2019 at 10:19:15 UTC, number wrote: The first link in the blog post to '..the last blog post' links to the 0022 article itself, not to a previous one. Corrected. BTW, it compiles fine without 'import gtk.c.types', too. Main.d (and maybe others) contains a 'public

Re: Templates - What's Up with the template keyword?

2019-04-08 Thread Ron Tarrant via Digitalmars-d-learn
On Monday, 8 April 2019 at 14:56:46 UTC, Mike Parker wrote: You should have read further along in that chapter :-) LOL! Actually, after reading Adam's reply, I dug back into your book and I'm starting to get a reasonable handle on this. I must say, I like the slow-but-steady intro you

Re: Templates - What's Up with the template keyword?

2019-04-08 Thread Ron Tarrant via Digitalmars-d-learn
On Monday, 8 April 2019 at 12:40:10 UTC, Adam D. Ruppe wrote: You don't need template keyword for the majority of cases because the compiler lets you do shortcuts. Thanks, Adam. Good to know. (maybe I am looking at the wrong part of the book, it is hard to find the right section/page number

Re: What Does @ Mean?

2019-04-08 Thread Ron Tarrant via Digitalmars-d-learn
Well, that was quick! Thanks Adam, Kagamin, and Alex.

What Does @ Mean?

2019-04-08 Thread Ron Tarrant via Digitalmars-d-learn
This is frustrating and makes me feel like a complete newb. Worse, it's impossible to search for. Ever try Googling a single character? The D documentation also doesn't seem to explain the meaning of this or any other token. Sure, most of them are obvious, but this one eludes me. All I can

Templates - What's Up with the template keyword?

2019-04-08 Thread Ron Tarrant via Digitalmars-d-learn
I'm digging into templates in an attempt to understand the signals-n-slots replacement for the observer pattern, but I've got a question I can't seem to find an answer for and an example for which I'm unable to solve the error. First, the question... In Michael Parker's book, "Learning D,"

Re: What Does @ Mean?

2019-04-08 Thread Ron Tarrant via Digitalmars-d-learn
On Monday, 8 April 2019 at 14:19:04 UTC, XavierAP wrote: On Monday, 8 April 2019 at 11:58:49 UTC, Ron Tarrant wrote: And while I'm asking, does an underscore have special meaning when used either at the beginning or end of a variable name? In D, @ is used as Adam has explained as a prefix

Re: What Does @ Mean?

2019-04-08 Thread Ron Tarrant via Digitalmars-d-learn
On Monday, 8 April 2019 at 14:27:11 UTC, JN wrote: Java uses @ for annotations too. Pascal uses @ for "address of", like & in D. Just one of the many reasons I balked at Java... many MANY reasons. Thanks, JN.

Re: Templates - What's Up with the template keyword?

2019-04-08 Thread Ron Tarrant via Digitalmars-d-learn
On Monday, 8 April 2019 at 14:56:46 UTC, Mike Parker wrote: In the subsequent sections, I show both long and short (eponymous) forms of enum and function templates. Forgot to say... I'm typing in the examples as I go and so far I haven't been lost. Even when you don't come right out and say

Re: Setting the GtkD Include Path in dexed?

2019-03-14 Thread Ron Tarrant via Digitalmars-d-learn
Thanks for replying, Basile. It's always nice to get info straight from the original code author. :) On Wednesday, 13 March 2019 at 11:59:11 UTC, Basile B. wrote: 1. "Compile File and Run" It's for the scripts-like program, i.e single module. For this, the dependencies must be registered in

Re: Setting the GtkD Include Path in dexed?

2019-03-14 Thread Ron Tarrant via Digitalmars-d-learn
On Thursday, 14 March 2019 at 16:02:01 UTC, Basile B. wrote: You must register put the static library file, not the object I thing, anyway, i just made you a video showing exactly what to do since finally the linker error is gone (yay !), also launch one of the demo file as a "runnable

Re: Setting the GtkD Include Path in dexed?

2019-03-12 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 12 March 2019 at 21:54:36 UTC, JN wrote: On Tuesday, 12 March 2019 at 17:39:06 UTC, Ron Tarrant wrote: Another way of asking this, I suppose, would be: How do I pass command line arguments to dmd from within dexed? How about Project -> Project editor -> Categories -> Other ->

Re: Setting the GtkD Include Path in dexed?

2019-03-13 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 12 March 2019 at 21:54:36 UTC, JN wrote: How about Project -> Project editor -> Categories -> Other -> dmdOtherOptions ? I take it this starts in the Project menu? I found Project Editor in the Project menu, but the rest eludes me. Can't find it.

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

2019-03-19 Thread Ron Tarrant via Digitalmars-d-learn
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

Re: gtkD: How to paint to screen for animation

2019-03-19 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 19 March 2019 at 00:54:34 UTC, Michelle Long wrote: I've added a function to addOnDraw for a DrawingArea and it paints using the code I have when I resize. I added a queueDraw in threadsAddIdle and it seems to draws the screen immediately but it does not seem to be called again.

Re: Setting the GtkD Include Path in dexed?

2019-03-12 Thread Ron Tarrant via Digitalmars-d-learn
Another way of asking this, I suppose, would be: How do I pass command line arguments to dmd from within dexed?

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

2019-03-12 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 12 March 2019 at 15:15:00 UTC, jmh530 wrote: I thought the suggestion was one thread in the Announce forum, rather than multiple threads in the Announce forum...rather than one thread in the Learn forum. It's a learning resource, so wouldn't that go here? Or am I misinterpreting

Setting the GtkD Include Path in dexed?

2019-03-12 Thread Ron Tarrant via Digitalmars-d-learn
I managed to get dexed to compile a single-file dub project, but for completeness sake, I'm also trying to configure it to use dmd (non-dub) to compile GtkD projects using Compilation (menu) > Compile File and Run. To that end, I have two questions... Should I be supplying dexed with the

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

2019-03-12 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 12 March 2019 at 16:08:46 UTC, jmh530 wrote: Tricky. My thinking exactly. (I would have replied with a simple, "Yup," but I did that once before and the forum software made me do a Capcha.)

Another Tuesday (Friday?), Another GtkDcoding Blog Post

2019-03-12 Thread Ron Tarrant via Digitalmars-d-learn
It was suggested that I do all these posts in one thread, so this is the thread where that'll happen. With that said... It's Tuesday! (and that used to be a Theatresports game when Keith Johnstone still ran things) OR... It's Friday! And that (the Tuesday OR Friday part) means it's time

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

2019-03-15 Thread Ron Tarrant via Digitalmars-d-learn
It's Friday and time for another post on the GtkDcoding blog. This time around, it's about text Entry widgets, both editable and non-editable.

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

2019-03-15 Thread Ron Tarrant via Digitalmars-d-learn
On Friday, 15 March 2019 at 09:21:28 UTC, Ron Tarrant wrote: It's Friday and time for another post on the GtkDcoding blog. This time around, it's about text Entry widgets, both editable and non-editable. Oops! Here's the link:

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

2019-03-22 Thread Ron Tarrant via Digitalmars-d-learn
On Thursday, 21 March 2019 at 21:34:26 UTC, Michelle Long wrote: I'd suggest adding pictures! It's very easy to take a screen shot and not much harder to link them and they offer far more interest. You're the second person to suggest this, so I'll explain my reasoning. I assure you, it's

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

2019-03-22 Thread Ron Tarrant via Digitalmars-d-learn
On Thursday, 21 March 2019 at 21:34:26 UTC, Michelle Long wrote: I'd suggest adding pictures! Oops! Forgot to say... I get why you want images. You were asking about animation the other day, so obviously you're a visual artist. So am I and I know how drawn I am to imagery and I imagine

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

2019-03-22 Thread Ron Tarrant via Digitalmars-d-learn
Also forgot... It's Friday again and time for another gtkDcoding blog post. In today's episode, we slap an image onto a Timmy the Button's face, then do a switch up to keep poor Timmy off balance. You can tune in here: http://gtkdcoding.com/2019/03/22/0020-image-buttons.html

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

2019-03-22 Thread Ron Tarrant via Digitalmars-d-learn
On Thursday, 21 March 2019 at 20:49:07 UTC, number wrote: 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

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

2019-03-22 Thread Ron Tarrant via Digitalmars-d-learn
On Friday, 22 March 2019 at 10:02:24 UTC, number wrote: 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? Yup, it was. I'm still trying to break the habit of putting optional

Re: Singleton in Action?

2019-02-06 Thread Ron Tarrant via Digitalmars-d-learn
On Monday, 4 February 2019 at 19:23:26 UTC, Jacob Carlborg wrote: You can call it with or without parentheses. It applies to all functions that don't take any arguments or functions taking a single argument and are called using UFCS [1]. [1] https://dlang.org/spec/function.html#pseudo-member

Re: Submenu Not Responding Until Second Click

2019-02-06 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 5 February 2019 at 09:41:06 UTC, Antonio Corbi wrote: It could be so, I'm not using gnome so I can't say. By the way, I'm using gtk3 3.24.5. Yeah, I updated from 3.22 to 3.24, but it made no difference on Windows 10. Still that delay with submenus. I'd rather be running

Re: Submenu Not Responding Until Second Click

2019-02-08 Thread Ron Tarrant via Digitalmars-d-learn
On Thursday, 7 February 2019 at 08:41:29 UTC, Antonio Corbi wrote: Hi Ron, xrandr (and gui interfaces for it like arandr) are your friends here. xrandr -q -> shows your card outputs and then you can use xrandr + options to configure monitors. Or you can use arandr that will do that for

Re: Linux & DMD & GtkD

2019-02-16 Thread Ron Tarrant via Digitalmars-d-learn
On Saturday, 16 February 2019 at 14:29:56 UTC, Russel Winder wrote: Pass, sorry. Thanks for the replies, guys... I quoted the above line because it's just about the only thing I understood. Let me explain... It's been almost 20 years since I used Linux and my notes are long gone. A ton

Re: Linux & DMD & GtkD

2019-02-18 Thread Ron Tarrant via Digitalmars-d-learn
On Monday, 18 February 2019 at 13:34:22 UTC, Ron Tarrant wrote: You've saved me a ton of time and effort. This can be interpreted as: flailing about, bashing my shell against the terminal.

Re: Linux & DMD & GtkD

2019-02-18 Thread Ron Tarrant via Digitalmars-d-learn
On Monday, 18 February 2019 at 06:29:54 UTC, Russel Winder wrote: Hopefully the above has helped, do feel free to ask further questions. I am a day-in, day-out Debian Sid user and so may still be making assumptions tht aren't working for you… I really appreciate all the time and effort you

Re: Linux & DMD & GtkD

2019-02-18 Thread Ron Tarrant via Digitalmars-d-learn
On Monday, 18 February 2019 at 13:55:41 UTC, Ron Tarrant wrote: But some day I shall reclaim my Super Cow Powers. :) Oh, I guess I misspelled 'seardh.' That may explain why my attempt to run aptitude was 'put out to pasture.'

Re: Linux & DMD & GtkD

2019-02-18 Thread Ron Tarrant via Digitalmars-d-learn
On Saturday, 16 February 2019 at 19:11:03 UTC, Antonio Corbi wrote: For one-file programs, dub usage is very easy. Placing a minimal comment-header between /+ +/ symbol comments, gets your job done like in this example ( I think the gtkd code is from one of your examples in the blog):

Re: Linux & DMD & GtkD

2019-02-18 Thread Ron Tarrant via Digitalmars-d-learn
On Sunday, 17 February 2019 at 14:19:35 UTC, Jordi Sayol wrote: To add this repository to your Linux Mint just run this two lines from command line: Jordi Thanks, Jordi. This is going straight into my notes. You've saved me a ton of time and effort.

Re: Linux & DMD & GtkD

2019-02-18 Thread Ron Tarrant via Digitalmars-d-learn
On Monday, 18 February 2019 at 10:38:10 UTC, Peter Jacobs wrote: Being an old linux user, I prefer make to dub, however, I do use dub to build GtkD and then I just use dmd to build my application program. This appeals to me, too. dub clean dub build Got this bit working after generating

Re: Linux & DMD & GtkD

2019-02-18 Thread Ron Tarrant via Digitalmars-d-learn
On Saturday, 16 February 2019 at 19:11:03 UTC, Antonio Corbi wrote: /+ dub.sdl: name "gtkhello" dflags "-dip25" "-dip1000" dependency "gtk-d:gtkd" version="~>3.8.0" +/ /* dub run --single gtkhello.d dub build --single gtkhello.d. dub gtkhello.d . */ This is

Linux & DMD & GtkD

2019-02-16 Thread Ron Tarrant via Digitalmars-d-learn
Hi guys, I finally got a Linux Mint installation happening (very impressed, BTW) and did the usual HelloWorld.d compile with dmd, but I'm having trouble working out how to link to GtkD. dmd -de -w -m64 -L+gtkd hello_gtkd_world.d says it can't find MainWindow which tells me the gtkd

Singleton in Action?

2019-02-02 Thread Ron Tarrant via Digitalmars-d-learn
Hi guys, I ran into another snag this morning while trying to implement a singleton. I found all kinds of examples of singleton definitions, but nothing about how to put them into practice. Can someone show me a code example for how one would actually use a singleton pattern in D? When I

Re: Singleton in Action?

2019-02-03 Thread Ron Tarrant via Digitalmars-d-learn
On Saturday, 2 February 2019 at 19:40:25 UTC, Andre Pany wrote: I found here an example: https://rosettacode.org/wiki/Singleton#D Kind regards Andre Thanks, Andre. Exactly what I was hoping for.

Re: Singleton in Action?

2019-02-03 Thread Ron Tarrant via Digitalmars-d-learn
On Saturday, 2 February 2019 at 20:30:15 UTC, Neia Neutuladh wrote: And consider putting the class in its own source file. Yes, by all means. Speaking of which... Considering the nature of a singleton such the one in the top post, I can't see it being possible to use one as a base class

Re: Singleton in Action?

2019-02-03 Thread Ron Tarrant via Digitalmars-d-learn
On Saturday, 2 February 2019 at 19:40:25 UTC, Andre Pany wrote: https://rosettacode.org/wiki/Singleton#D Do you know if this is for a current version of D? The compiler is choking on the import statements, complaining that it can't read std/thread.d and std/c/time.d

Re: Singleton in Action?

2019-02-02 Thread Ron Tarrant via Digitalmars-d-learn
Thanks for the replies, fellow programmers. (generic, unisex, PC, and all-encompassing) If I could trouble someone for a complete working example so I have something to study, that would be excellent.

Re: Singleton in Action?

2019-02-03 Thread Ron Tarrant via Digitalmars-d-learn
On Sunday, 3 February 2019 at 11:17:38 UTC, Jonathan M Davis wrote: I don't recall std.thread ever existing, and std.c.time hasn't been around for a while. Thread is in core.thread, and all of the C bindings for standard C and OS APIs are supposed to be in druntime. So, the equivalent to C's

Re: Singleton in Action?

2019-02-03 Thread Ron Tarrant via Digitalmars-d-learn
On Sunday, 3 February 2019 at 10:28:51 UTC, Alex wrote: Isn't deriving a singleton even eviler as having one? ;) Perhaps this was meant as rhetoric, but I think you may be right. This morning I was Googling "singleton replacement" and someone on another forum said Factory would do the job.

Re: Singleton in Action?

2019-02-04 Thread Ron Tarrant via Digitalmars-d-learn
On Sunday, 3 February 2019 at 18:53:10 UTC, Jacob Carlborg wrote: You don't need to make it so complicated. Here's a simpler example: Excellent. Thank you. Simple is best. private __gshared auto instance_ = new DSingleton; My understanding is that in D, this line effectively says:

Re: Singleton in Action?

2019-02-04 Thread Ron Tarrant via Digitalmars-d-learn
On Sunday, 3 February 2019 at 22:25:18 UTC, Dejan Lekic wrote: I strongly suggest you find the thread started by Andrej Mitrovic many years ago. He compared several implementations of (thread-safe) singletons. I it an extremely helpful stuff, IMHO. Thanks. I'll see if I can find it.

Re: Submenu Not Responding Until Second Click

2019-02-05 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 5 February 2019 at 08:43:21 UTC, WebFreak001 wrote: works fine here, can't reproduce with your example code. Maybe some GTK configuration of your system? From the questions you guys asked, I just realized I should have said I'm running on Windows 10.

Re: Submenu Not Responding Until Second Click

2019-02-05 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 5 February 2019 at 08:51:49 UTC, Antonio Corbi wrote: Have you tweaked your gtk theme? If so, could you try with the default (Adwaita) gtk theme? This is a Linux/Gnome thing, I'm assuming? Still, I'll look into other configuration stuff and see where it leads. Thanks, Antonio.

Submenu Not Responding Until Second Click

2019-02-04 Thread Ron Tarrant via Digitalmars-d-learn
I posted about this over on the GtkD site, but I suspect no one's home until later in the day. I've been writing up examples for menus and found some odd behaviour. Now I'm wondering if I've missed something. The code compiles without error and runs. But after the window opens, first click

Re: Singleton in Action?

2019-02-04 Thread Ron Tarrant via Digitalmars-d-learn
On Sunday, 3 February 2019 at 15:33:15 UTC, Russel Winder wrote: There is a lot of good stuff (both positive and negative) on Singleton here, but there is also a bit of prejudice and bigotry. Many of the links are worth looking through.

Re: Templates - What's Up with the template keyword?

2019-04-09 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 9 April 2019 at 14:25:18 UTC, Mike Parker wrote: Off the top of my head, to get a Singleton template, you could implement all of your singleton plumbing (thread safety if you need it, etc) in the template and add a `static _instance` member just as you would for any non-templated

Re: Templates - What's Up with the template keyword?

2019-04-09 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 9 April 2019 at 14:41:30 UTC, Alex wrote: Your confusion arises in your understanding of meta programming and templates. Templates are compile time expressions that use parameters. This sounds like another 'no.' :) Thanks for all the info, Alex.

gtkDcoding Blog Post #0025 - LinkButtons

2019-04-09 Thread Ron Tarrant via Digitalmars-d-learn
Good morning! A new post is up on the gtkDcoding blog. It's all about the LinkButton and you can find it here: http://gtkdcoding.com/2019/04/09/0025-creating-and-using-a-linkButton.html

Re: gtkDcoding Blog Post # 26 - Menu Basics

2019-04-13 Thread Ron Tarrant via Digitalmars-d-learn
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 OS limitation (meaning gtk standard dialogs). Because the

gtkDcoding Blog Post # 26 - Menu Basics

2019-04-12 Thread Ron Tarrant via Digitalmars-d-learn
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: I really don't understand DUB

2019-04-14 Thread Ron Tarrant via Digitalmars-d-learn
On Monday, 8 April 2019 at 19:54:28 UTC, WhatMeWorry wrote: I've been trying to troubleshoot a DUB issue for two days now and I've come to the conclusion, I don't really understand DUB and I'm tired of muddling through. Just so you know who I am and what my experience is: I've only been

Re: I really don't understand DUB

2019-04-15 Thread Ron Tarrant via Digitalmars-d-learn
On Sunday, 14 April 2019 at 20:51:10 UTC, Andre Pany wrote: To solve your specify the targetType explicitly in your dub.sdl file. https://dub.pm/package-format-json.html#target-types Kind regards Andre Thanks, Andre. Yeah, I did sort that out. My dilemma ATM is why I'm (seemingly

Re: gtkDcoding Blog Post # 26 - Menu Basics

2019-04-12 Thread Ron Tarrant via Digitalmars-d-learn
On Friday, 12 April 2019 at 13:56:51 UTC, number wrote: Thanks, I'm still a reader! Excellent. Thanks for letting me know. 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

  1   2   3   4   >