Re: [go-nuts] Re: need library suggestions on writing a record program

2016-11-29 Thread biatche
If you already knew theres an existing library, why write a new one? 
Self-challenge of some sort? :) It's really something though.

On Wednesday, November 30, 2016 at 1:51:20 AM UTC+8, Egon wrote:
>
> On Tuesday, 29 November 2016 19:35:21 UTC+2, bia...@gmail.com wrote:
>>
>> Did you write that code just for this thread?
>>
>
> Yeah, had 2hrs of fun with it :)
>  
>
>> I really appreciate it. That gives me options. It runs and its possible 
>> for me to setup something based on this.
>>
>
>> On Tuesday, November 29, 2016 at 11:10:44 PM UTC+8, Egon wrote:
>>>
>>> On Tuesday, 29 November 2016 14:03:13 UTC+2, Ronny Bangsund wrote:



 On Tuesday, November 29, 2016 at 7:11:57 AM UTC+1, bia...@gmail.com 
 wrote:
>
> I've been wondering how I should setup input fields. should 
> termbox be responsible for it? or termui as you suggested (this  seems 
> more 
> for monitoring...) or even gocui?
>
  I've tested termui and GOCUI extensively, and found both to be the 
 best options for exactly that sort of thing. I did have to modify 
 things/make custom widgets to get lists working how *I* like them, but 
 it's 
 very easy to use.

 I'm leaning slightly towards GOCUI personally, but that doesn't mean 
 you should reach for that without testing termui. Both are fairly easy to 
 set up, but they have different ways of handling input and updating the 
 display.

 If anyone is kind enough to show some example code of a page with input 
> fields maybe 1-2 input fields it'd greatly help.
>
  There isn't really much to it. There are very few widgets - everything 
 is basically a bit of text, with or without a border, with different 
 colours and/or cursors to indicate its purpose. Examples of what you need 
 would be useful.

 For more direct help I can recommend the Gopher Slack (I can show more 
 of my code there).


>>> Depending on how much different behavior you need, it's possible to 
>>> implement your own basic library for handling UI on the terminal.
>>>
>>> You can take a look at a proof of concept here: 
>>> https://github.com/egonelbre/exp/blob/master/dos/main.go
>>>
>>> Of course, you would need to re-implement it yourself and adjust to your 
>>> own needs.
>>>
>>> NB: Dig around in the code-base, if you don't feel comfortable with it, 
>>> then you probably should use an existing library.
>>>
>>> + Egon
>>>
>>>
>>>  
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Re: need library suggestions on writing a record program

2016-11-29 Thread biatche
Did you write that code just for this thread? I really appreciate it. That 
gives me options. It runs and its possible for me to setup something based 
on this.

On Tuesday, November 29, 2016 at 11:10:44 PM UTC+8, Egon wrote:
>
> On Tuesday, 29 November 2016 14:03:13 UTC+2, Ronny Bangsund wrote:
>>
>>
>>
>> On Tuesday, November 29, 2016 at 7:11:57 AM UTC+1, bia...@gmail.com 
>> wrote:
>>>
>>> I've been wondering how I should setup input fields. should termbox 
>>> be responsible for it? or termui as you suggested (this  seems more for 
>>> monitoring...) or even gocui?
>>>
>>  I've tested termui and GOCUI extensively, and found both to be the best 
>> options for exactly that sort of thing. I did have to modify things/make 
>> custom widgets to get lists working how *I* like them, but it's very easy 
>> to use.
>>
>> I'm leaning slightly towards GOCUI personally, but that doesn't mean you 
>> should reach for that without testing termui. Both are fairly easy to set 
>> up, but they have different ways of handling input and updating the display.
>>
>> If anyone is kind enough to show some example code of a page with input 
>>> fields maybe 1-2 input fields it'd greatly help.
>>>
>>  There isn't really much to it. There are very few widgets - everything 
>> is basically a bit of text, with or without a border, with different 
>> colours and/or cursors to indicate its purpose. Examples of what you need 
>> would be useful.
>>
>> For more direct help I can recommend the Gopher Slack (I can show more of 
>> my code there).
>>
>>
> Depending on how much different behavior you need, it's possible to 
> implement your own basic library for handling UI on the terminal.
>
> You can take a look at a proof of concept here: 
> https://github.com/egonelbre/exp/blob/master/dos/main.go
>
> Of course, you would need to re-implement it yourself and adjust to your 
> own needs.
>
> NB: Dig around in the code-base, if you don't feel comfortable with it, 
> then you probably should use an existing library.
>
> + Egon
>
>
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Re: need library suggestions on writing a record program

2016-11-28 Thread biatche



The above is what the present DOS program looks like. Within each section 
are simply input/text fields. This certain old man who wants this done 
doesn't want a web interface. Before I begin learning, I've been wondering 
how I should setup input fields. should termbox be responsible for it? 
or termui as you suggested (this  seems more for monitoring...) or even 
gocui?

If anyone is kind enough to show some example code of a page with input 
fields maybe 1-2 input fields it'd greatly help.


On Tuesday, November 29, 2016 at 1:45:25 PM UTC+8, Jason Playne wrote:
>
> If you really must use a terminal ui - maybe try 
> https://github.com/gizak/termui it seems quite nice. if you can make 
> people SSH into your app (using some golang ssh server magic) that might be 
> a way to go as well.
>
> Otherwise go for a web based solution (as layout would be much easier)
>
> On 29 November 2016 at 03:19, Rick  > wrote:
>
>> I've written a small program for work in gocui and am quite happy with 
>> the results.
>>
>>
>> On Monday, 28 November 2016 08:12:35 UTC-8, bia...@gmail.com wrote:
>>>
>>> i'd like to rewrite an old dos medical patient record program in go for 
>>> a friend. its not a complex program by any means
>>>
>>> i'd probably use go-sqlite3 for storage but its the terminal part where 
>>> I'm confused. should i use gocui or termbox directly?
>>>
>>> the program will only have menus to be controlled using arrow-keys, 
>>> hotkeys, fields for keying in data
>>>
>>> if there are any other libs i should know of that may be useful in this 
>>> task please share.
>>>
>>> keep in mind, i have no knowledge of go.. but this should be the first 
>>> first proper programming language i'd learn. (im currently reasonable in 
>>> bash scripting)
>>>
>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to golang-nuts...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] need library suggestions on writing a record program

2016-11-28 Thread biatche
i'd like to rewrite an old dos medical patient record program in go for a 
friend. its not a complex program by any means

i'd probably use go-sqlite3 for storage but its the terminal part where I'm 
confused. should i use gocui or termbox directly?

the program will only have menus to be controlled using arrow-keys, 
hotkeys, fields for keying in data

if there are any other libs i should know of that may be useful in this 
task please share.

keep in mind, i have no knowledge of go.. but this should be the first 
first proper programming language i'd learn. (im currently reasonable in 
bash scripting)


-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.