Search Results

Search found 54 results on 3 pages for 'curses'.

Page 1/3 | 1 2 3  | Next Page >

  • Compiled ruby fails to find curses

    - by Hamish Downer
    I'm attempting to install the sup MUA but I'm having trouble. When I try to run it, it can't find curses: /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- curses (LoadError) ... I am installing on a server running CentOS 5. I have compiled ruby and rubygems from source, and then installed sup using rubygems. I followed this article to compile ruby. I have found having a similar problem on ubuntu. The fix suggested there is to install libcurses-ruby, but I can't find a similarly named package in CentOS. I have installed the ncurses-devel package, as that was required for installing sup using gem. I have also installed the ncurses, cursesx and rbcurse gems, but none of these have fixed the problem. The article above about compiling ruby said you had to recompile the zlib extension, after doing: cd ext/zlib sudo ruby extconf.rb --with-zlib-include=/usr/include --with-zlib-lib=/usr/lib cd ../.. sudo make sudo make install So I've tried a few variants in ext/curses. The top few lines of ext/curses/extconf.rb are require 'mkmf' dir_config('curses') dir_config('ncurses') dir_config('termcap') So I've tried a few variants of setting paths: sudo ruby extconf.rb --with-curses-include=/usr/include --with-curses-lib=/usr/lib --with-ncurses-include=/usr/include --with-ncurses-lib=/usr/lib --with-termcap-lib=/lib sudo ruby extconf.rb --with-curses-include=/usr/include --with-curses-lib=/usr/lib --with-termcap-lib=/lib and re-doing the make, but to no avail as yet. Any ideas to move it forward are welcome.

    Read the article

  • How to scroll text in Python/Curses subwindow?

    - by lecodesportif
    In my Python script which uses Curses, I have a subwin to which some text is assigned. Because the text length may be longer than the window size, the text should be scrollable. It doesn't seem that there is any CSS-"overflow" like attribute for Curses windows. The Python/Curses docs are also rather cryptic on this aspect. Does anybody here have an idea how I can code a scrollable Curses subwindow using Python and actually scroll through it? \edit: more precise question

    Read the article

  • Perl Curses::UI

    - by user353211
    I am trying to use the library Curses:UI from http://search.cpan.org/dist/Curses-UI/ to build a UI on linux karmic. I can create a simple user interface e.g.: #!usr/usr/bin/perl use strict; use Curses; use Curses::UI; $ui = new Curses::UI(-color_support=1,-clear_on_exit=1,-intellidraw=1); my $window = $ui-add('window', 'Window',intellidraw=1); my $message = $window-add(-text="Hello!",-intellidraw=1); $window-focus(); $ui-mainloop(); Question: I need some way to communicate informatio to the UI i.e. I have a loop which will wait for message to come and change the text in window. Once this message comes a popup will be displayed. Attempt: my $ui = new Curses::UI(-color_support=1,-clear_on_exit=1,-intellidraw=1); my $window = $ui-add('window', 'Window',intellidraw=1); my $message = $window-add(-text="Hello!",-intellidraw=1); pseudocode while(true) #implemented a function to wait { popup($window-text("Hello how are you?")); } $window-focus(); $ui-mainloop(); Problem: The above does not work. I am given a dark screen where my message is displayed. I have read the documentation and when I relocate : $ui-mainloop() above the while loop I am given the user interface but now nothing communicates to the window. Coincise Question: I need some way of displaying the user interface wait for inputs and display messages. Could anyone please help me on this? Thank you!

    Read the article

  • are there any tree libraries/widgets for (n)curses

    - by phatmanace
    Hi - I wondered if there were any tree libraries available for (n)curses. I'm trying to write a component that shows a tree of folders & was curious if there was a prebuilt curses component that could do this. I've checked 'core' curses as well as libraries like CDK - and I can't seem to find anything. If none exists, I'm not averse to building my own - but I can't seem to locate any decent tutorials on doing this, so any help in this regard would also be much appreciated. Thanks, Ace

    Read the article

  • Using a debugger and curses at the same time?

    - by Matt Joiner
    I'm calling python -m pdb myapp.py, when an exception fires, and I'd normally be thrown back to the pdb interpreter to investigate the problem. However this exception is being thrown after I've called through curses.wrapper() and entered curses mode, rendering the pdb interpreter useless. How can I work around this?

    Read the article

  • qemu -cdrom ubuntu.iso -boot d -net nic,model=virtio -m 1024 -curses

    - by Gert Cuykens
    How do I disable frame buffers in Ubuntu 13.10 Saucy kernel, I tried all kinds of kernel parameters but none work? DEFAULT ramdisk LABEL ramdisk kernel /casper/vmlinuz append boot=casper toram initrd=/casper/initrd.img -- vesafb.nonsense=1 LABEL isotest kernel /casper/vmlinuz append boot=casper integrity-check initrd=/casper/initrd.img -- vesafb.nonsense=1 LABEL memtest kernel /install/memtest append - DISPLAY isolinux.txt TIMEOUT 300 PROMPT 1

    Read the article

  • How do I delete a curse window in python and restore background window?

    - by Zloy Smiertniy
    Hell-o guys, I'm working on python curses and I have my initial window with initscr() and I create several new windows to overlap it, I want to know if I can delete these windows and restore the standard screen without having to refill it. Is there a way? I can also ask if someone can tell me the difference between a window, subwindow, pad and sub pad. I have this code: stdscr = curses.initscr() Then I fill it with random letters stdscr.refresh() newwin=curses.newwin(10,20,5,5) newwin.touchwin() newwin.refresh() I want to delete newwin here so that if I write stdscr.refresh() newwin won't appear stdscr.touchwin() stdscr.refresh() And here it should appear as if no window was created.

    Read the article

  • [C++ / NCURSES] Can't convert from 'int' to 'int *'

    - by flarn2006
    So I have these lines of code: int maxY, maxX; getmaxyx(stdscr, &maxY, &maxX); It gives me the following error: error C2440: '=' : cannot convert from 'int' to 'int *' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast twice for each time I use it. I'm not even using the = operator! The curses.h file is included. What am I doing wrong?

    Read the article

  • Create two separate windows in terminal

    - by Honza Pokorny
    Picture a terminal. There are two windows inside that terminal. One on top, one on bottom. The top one is much bigger. The top one receives asynchronous updates. The bottom one is for user input. It would work almost exactly the same as vim - the text editor. I'm writing this in Python. I'm guessing you would do this by using curses, but I'm not sure if it's possible.

    Read the article

  • What's wrong with my code? (pdcurses/getmaxyx)

    - by flarn2006
    It gives me an access violation on the getmaxyx line (second line in the main function) and also gives me these two warnings: LINK : warning LNK4049: locally defined symbol "_stdscr" imported LINK : warning LNK4049: locally defined symbol "_SP" imported Yes, it's the same code as in another question I asked, it's just that I'm making it more clear. And yes, I have written programs with pdcurses before with no problems. #include <time.h> #include <curses.h> #include "Ball.h" #include "Paddle.h" #include "config.h" int main(int argc, char *argv[]) { int maxY, maxX; getmaxyx(stdscr, maxY, maxX); Paddle *paddleLeft = new Paddle(0, KEY_L_UP, KEY_L_DOWN); Paddle *paddleRight = new Paddle(maxX, KEY_R_UP, KEY_R_DOWN); Ball *ball = new Ball(paddleLeft, paddleRight); int key = 0; initscr(); cbreak(); noecho(); curs_set(0); while (key != KEY_QUIT) { key = getch(); paddleLeft->OnKeyPress(key); paddleRight->OnKeyPress(key); } endwin(); return 0; }

    Read the article

  • Can I compile mutt under cygwin?

    - by openist
    I've been trying to compile mutt under cygwin for a few days. I always get the message: "configure: error: no curses library found" I have all the curses + devel stuff installed + termpcap, which I heard might be related. I've tried re-installing, i've tried specifying the location on the configure command line, but i'm not sure i'm doing it right: "--with-curses=/usr/lib/libncurses.a --with-curses=/usr/lib/libncurses.dll.a --with-curses=/usr/include/ncurses" Here's my config.log: http://floatsolutions.net/docs/config.log Any ideas?

    Read the article

  • KEY_ENTER vs '\n'?

    - by wrongusername
    When I'm using PDcurses and I try to have a while loop exit when the enter key is pressed with while(key != KEY_ENTER), the while loop never exits. However, when I try to have the same loop exit with while((char)key != '\n'), it exits successfully whenever I pressed enter. What's the difference?

    Read the article

  • Linker warnings when using stdscr (ncurses)

    - by flarn2006
    Okay, so I'm getting these warnings whenever I try to use stdscr in pdcurses: LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library LINK : warning LNK4049: locally defined symbol "_stdscr" imported LINK : warning LNK4049: locally defined symbol "_SP" imported How do I fix this? They're just warnings, but when I run my program, it crashes, so they probably have something to do with it. Especially considering the fact that the line it crashes at is the one that uses stdscr...

    Read the article

  • Can I compile mutt under cygwin?

    - by openist
    I've been trying to compile mutt under cygwin for a few days. The included version is outdated and does not include things I need like header caching. Anyways, I always get the message: "configure: error: no curses library found" I have all the curses + devel stuff installed + termpcap, which I heard might be related. I've tried re-installing, i've tried specifying the location on the configure command line, but i'm not sure i'm doing it right: "--with-curses=/usr/lib/libncurses.a --with-curses=/usr/lib/libncurses.dll.a --with-curses=/usr/include/ncurses" Here's my config.log: http://floatsolutions.net/docs/config.log Any ideas? EDIT: Context

    Read the article

  • psybnc on nas: ncurses problem

    - by holms
    Trying to get compile psybnc on NAS. ipkg is default package manager in here. I've installed ncurses already, it's in /opt/lib (libncurses.so) [\w] # ls /opt/lib | grep ncurses libncurses.so libncurses.so.5 libncurses.so.5.7 libncursesw.so libncursesw.so.5 libncursesw.so.5.7 [\w] # file libncurses.so.5.7 libncurses.so.5.7: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, stripped I added this path to /etc/profile [\w] # echo $PATH /bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:/opt/lib So trying to make menuconfig gives me this error [\w] # make menuconfig Initializing Menu-Configuration [*] Running Conversion Tool for older psyBNC Data. Using existent configuration File. [*] Running Autoconfig. System: Linux Socket Libs: Internal. Environment: Internal. Time-Headers: in time.h and sys/time.h Byte order: Big Endian. IPv6-Support: Yes, general support. But no interface configured. async-DNS-Support: Yes. SSL-Support: No openssl found. Get openssl at www.openssl.org Creating Makefile [*] Creating Menu, please wait. This needs the ncurses library. If it is not available, menuconf wont work. If you are using curses, use make menuconfig-curses instead. make: *** [menuconfig] Error 1 Same goes for make menuconfig-curses [\w] # make menuconfig-curses Initializing Menu-Configuration using Curses [*] Running Conversion Tool for older psyBNC Data. Using existent configuration File. [*] Running Autoconfig. System: Linux Socket Libs: Internal. Environment: Internal. Time-Headers: in time.h and sys/time.h Byte order: Big Endian. IPv6-Support: Yes, general support. But no interface configured. async-DNS-Support: Yes. SSL-Support: No openssl found. Get openssl at www.openssl.org Creating Makefile [*] Creating Menu, please wait. This needs the curses library. If it is not available, menuconf wont work. make: *** [menuconfig-curses] Error 1 Psybnc compiled ok, just wanna work with menuconfig instead of configuration file.

    Read the article

  • Scroll bar for vim(curses-based one, not gvim)?

    - by xiaq
    As a Linux user, I have been quite comfortable with CLI and TUI tools, but I miss the little scrollbar present in almost every GUI program. It has always been easier for me to know how long the file is and where I am from the scrollbar instead of "9752 lines, 24%". What I expect is a ASCII scrollbar that looks like | | | | # # # | | | and I can configure to appear on the left or right (and if on the left, the relative position to line numbers and fold marks). Is there already a Vim plugin to do this, or how can I write my own one? Vim's plugin framework doesn't seem to support such UI modifications directly.

    Read the article

  • Unable install cmake and ccmake?

    - by user159618
    So the thing is I'm trying to install Cmake and cmake-curses-gui. I have updated the system with apt-get-update. sudo apt-get install cmake Reading package lists... Done Building dependency tree Reading state information... Done Package cmake is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'cmake' has no installation candidate sudo apt-get install cmake-curses-gui Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package cmake-curses-gui That's strange. Can anyone give some pointers? Pastbin sources.list :- http://pastebin.com/DufycYfZ

    Read the article

  • Error Using PDCurses: Cannot Open File Libc.C

    - by cam
    I'm getting the error: 1>LINK : fatal error LNK1104: cannot open file 'LIBC.lib' Here's my source code: #include <curses.h> int main() { initscr(); /* Start curses mode */ printw("Hello World !!!"); /* Print Hello World */ refresh(); /* Print it on to the real screen */ getch(); /* Wait for user input */ endwin(); /* End curses mode */ return 0; } I've configured the PDcurses library properly (added to Additional Include libraries, added folder to Additional Library Directories). I've looked around for a bit, and I've tried adding Libc.C to the 'Ignore Library' list, which in turn causes about 150 errors. Not sure what to do from here.

    Read the article

  • Change Command Prompt width from the Command Line

    - by Starkers
    Don't really know what more I can say really. That window captured below will simply not get any larger. Are there some settings somewhere that will allow me to resize it? See, this limited window thing has left me in a bit of a pickle. Basically I've created an application with a command line GUI (With Ruby's Curses Library), and while everything works beautifully on OSX and Ubuntu Terminals, with Command Prompt, if the Curses Windows are larger than the Command Prompt window as shown below, the whole application crashes with a 'window already closed' error. So, is there a setting that allows users to resize their Command Prompt window, something that I'll have to put in the documentation. Here's what the holy grail answer would, be though: Is there a way to do this from the command line? Could my application detect if the Command Prompt it's running on is of fixed width, and actually programatically run the command to allow the Command Prompt window to be enlarged? Or at least give the user a helpful error message?

    Read the article

  • What emulator / VM software can I use to create a Win32-portable Linux Guest?

    - by Jotham
    Hi, I want to create a portable VM setup so that I can boot a Linux install regardless of which Windows XP / Windows 7 host machine I am on. I was looking at Qemu but it doesn't appear to have a relatively safe win32 build. Other things like VirtualBox require complete install on the host OS for performance reasons. I'm not so concerned about performance, I just want to run a few curses based applications. My ideal end goal would be a a memory stick of some size with a VM/Emulator I can boot on most WinXP/Windows 7 machines and access my own curses based applications (probably archlinux or debian). Any help would be appreciated. Regards,

    Read the article

  • I Can't Install or Remove Any Application

    - by berkay gürsoy
    when i try to install or remove an application via either software center or apt-get install they both fail and give some debconf errors below is the log please help.Sorry some of the text is not english. sudo apt-get install aptitude Paket listeleri okunuyor... Bitti Bagimlilik agaci insa ediliyor. Durum bilgisi okunuyor... Bitti Asagidaki ek paketler de yüklenecek: aptitude-common libboost-iostreams1.49.0 libcwidget3 Önerilen paketler: aptitude-doc-en aptitude-doc tasksel debtags libcwidget-dev Asagidaki YENI paketler kurulacak: aptitude aptitude-common libboost-iostreams1.49.0 libcwidget3 Yükseltilen: 0, Yeni Kurulan: 4, Kaldirilacak: 0 ve Yükseltilmeyecek: 48. 8 tam olarak kurulmadi veya kaldirilmadi. Indirilmesi gereken dosya boyutu 0 B/2.498 kB Bu islemden sonra 10,4 MB ek disk alani kullanilacak. Devam etmek istiyor musunuz [E/h]? e Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 44, <DEBCONF_CONFIG> chunk 3. Use of uninitialized value in -e at /usr/share/perl5/Debconf/DbDriver/File.pm line 46, <DEBCONF_CONFIG> chunk 3. Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Debconf/DbDriver/File.pm line 47, <DEBCONF_CONFIG> chunk 3. Use of uninitialized value $directory in -d at /usr/share/perl5/Debconf/DbDriver/File.pm line 48, <DEBCONF_CONFIG> chunk 3. Use of uninitialized value $directory in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 49, <DEBCONF_CONFIG> chunk 3. debconf: DbDriver "config": mkdir :Böyle bir dosya ya da dizin yok Selecting previously unselected package aptitude-common. dpkg: uyari: files list file for package 'aspell' missing; assuming package has no files currently installed dpkg: uyari: files list file for package 'ubuntu-desktop' missing; assuming package has no files currently installed dpkg: uyari: files list file for package 'vuze' missing; assuming package has no files currently installed dpkg: uyari: files list file for package 'java-wrappers' missing; assuming package has no files currently installed (Veritabani okunuyor... 198988 files and directories currently installed.) Unpacking aptitude-common (from .../aptitude-common_0.6.8.1-2ubuntu1_all.deb) ... Selecting previously unselected package libboost-iostreams1.49.0. Unpacking libboost-iostreams1.49.0 (from .../libboost-iostreams1.49.0_1.49.0-3.1ubuntu1_amd64.deb) ... Selecting previously unselected package libcwidget3. Unpacking libcwidget3 (from .../libcwidget3_0.5.16-3.4ubuntu1_amd64.deb) ... Selecting previously unselected package aptitude. Unpacking aptitude (from .../aptitude_0.6.8.1-2ubuntu1_amd64.deb) ... wicd-daemon (1.7.2.4-2ubuntu1) kuruluyor... Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 44, <DEBCONF_CONFIG> chunk 3. Use of uninitialized value in -e at /usr/share/perl5/Debconf/DbDriver/File.pm line 46, <DEBCONF_CONFIG> chunk 3. Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Debconf/DbDriver/File.pm line 47, <DEBCONF_CONFIG> chunk 3. Use of uninitialized value $directory in -d at /usr/share/perl5/Debconf/DbDriver/File.pm line 48, <DEBCONF_CONFIG> chunk 3. Use of uninitialized value $directory in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 49, <DEBCONF_CONFIG> chunk 3. debconf: DbDriver "config": mkdir :Böyle bir dosya ya da dizin yok dpkg: error processing wicd-daemon (--configure): installed post-installation script alt islemi çikis durumunda hata döndürdü : 1 man-db (2.6.3-1) kuruluyor... Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 44, <DEBCONF_CONFIG> chunk 3. Use of uninitialized value in -e at /usr/share/perl5/Debconf/DbDriver/File.pm line 46, <DEBCONF_CONFIG> chunk 3. Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Debconf/DbDriver/File.pm line 47, <DEBCONF_CONFIG> chunk 3. Use of uninitialized value $directory in -d at /usr/share/perl5/Debconf/DbDriver/File.pm line 48, <DEBCONF_CONFIG> chunk 3. Use of uninitialized value $directory in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 49, <DEBCONF_CONFIG> chunk 3. debconf: DbDriver "config": mkdir :Böyle bir dosya ya da dizin yok dpkg: error processing man-db (--configure): installed post-installation script alt islemi çikis durumunda hata döndürdü : 1 dictionaries-common (1.12.10) kuruluyor... Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 44, <DEBCONF_CONFIG> chunk 3. Use of uninitialized value in -e at /usr/share/perl5/Debconf/DbDriver/File.pm line 46, <DEBCONF_CONFIG> chunk 3. Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Debconf/DbDriver/File.pm line 47, <DEBCONF_CONFIG> chunk 3. Use of uninitialized value $directory in -d at /usr/share/perl5/Debconf/DbDriver/File.pm line 48, <DEBCONF_CONFIG> chunk 3. Use of uninitialized value $directory in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 49, <DEBCONF_CONFIG> chunk 3. debconf: DbDriver "config": mkdir :Böyle bir dosya ya da dizin yok dpkg: error processing dictionaries-common (--configure): installed post-installation script alt islemi çikis durumunda hata döndürdü : 1 dpkg: dependency problems prevent configuration of aspell: aspell depends on dictionaries-common (>> 0.40); bununla beraber: Package dictionaries-common is not configured yet. dpkg: error processing aspell (--configure): bagimlilik sorunlari - yapilandirilmadan birakiliyor dpkg: dependency problems prevent configuration of aspell-en: aspell-en depends on aspell (>= 0.60.3-2); bununla beraber: Package aspell is not configured yet. aspell-en depends on dictionaries-common (>= 0.49.2); bununla beraber: Package dictionaries-common is not configured yet. dpkg: error processing aspell-en (--configure): bagimlilik sorunlari - yapilandirilmadan birakiliyor dpkg: dependency problems prevent configuration of hyphen-en-us: hyphen-en-us depends on dictionaries-common (>= 0.10) | openoffice.org-updatedicts; bununla beraber: Package dictionaries-common is not configured yet. openoffice.org-updatedicts paketi yüklenmedi. Package dictionaries-common which provides openoffice.org-updatedicts is not configured yet. dpkg: error processing hyphen-en-us (--configure): bagimlilik sorunlari - yapilandirilmadan birakiliyor dpkg: dependency problems prevent configuration of wicd-gtk: wicd-gtk depends on wicd-daemon (= 1.7.2.4-2ubuntu1); bununla beraber: Package wicd-daemon is not configured yet. dpkg: error processing wicd-gtk (--configure): bagimlilik sorunlari - yapilandirilmadan birakiliyor dpkg: dependency problems prevent configuration of wicd: wicd depends on wicd-daemon (= 1.7.2.4-2ubuntu1); bununla beraber: Package wicd-daemon is not configured yet. wicd depends on wicd-gtk (= 1.7.2.4-2ubuntu1) | wicd-curses (= 1.7.2.4-2ubuntu1) | wicd-cli (= 1.7.2.4-2ubuntu1) | wicd-client; bununla beraber: Package wicd-gtk is not configured yet. wicd-curses paketi yüklenmedi. wicd-cli paketi yüklenmedi. wicd-client paketi yüklenmedi. Package wicd-gtk which provides wicd-client is not configured yet. dpkg: error processing wicd (--configure): bagimlilik sorunlari - yapilandirilmadan birakiliyor aptitude-common (0.6.8.1-2ubuntu1) kuruluyor... libboost-iostreams1.49.0 (1.49.0-3.1ubuntu1) kuruluyor... libcwidget3 (0.5.16-3.4ubuntu1) kuruluyor... aptitude (0.6.8.1-2ubuntu1) kuruluyor... update-alternatives: using /usr/bin/aptitude-curses to provide /usr/bin/aptitude (aptitude) in Otomatik Mod Processing triggers for libc-bin ... ldconfig deferred processing now taking place Islem sirasinda hatalar bulundu: wicd-daemon man-db dictionaries-common aspell aspell-en hyphen-en-us wicd-gtk wicd E: Sub-process /usr/bin/dpkg returned an error code (1)

    Read the article

  • Inherit one instance variable from the global scope

    - by Julian
    I'm using Curses to create a command line GUI with Ruby. Everything's going well, but I have hit a slight snag. I don't think Curses knowledge (esoteric to be fair) is required to answer this question, just Ruby concepts such as objects and inheritance. I'm going to explain my problem now, but if I'm banging on, just look at the example below. Basically, every Window instance needs to have .close called on it in order to close it. Some Window instances have other Windows associated with it. When closing a Window instance, I want to be able to close all of the other Window instances associated with it at the same time. Because associated Windows are generated in a logical fashion, (I append the name with a number: instance_variable_set(self + integer, Window.new(10,10,10,10)) ), it's easy to target generated windows, because methods can anticipate what assosiated windows will be called, (I can recreate the instance variable name from scratch, and almost query it: instance_variable_get(self + integer). I have a delete method that handles this. If the delete method is just a normal, global method (called like this: delete_window(@win543) then everything works perfectly. However, if the delete method is an instance method, which it needs to be in-order to use the self keyword, it doesn't work for a very clear reason; it can 'query' the correct instance variable perfectly well (instance_variable_get(self + integer)), however, because it's an instance method, the global instances aren't scoped to it! Now, one way around this would obviously be to simply make a global method like this: delete_window(@win543). But I have attributes associated with my window instances, and it all works very elegantly. This is very simplified, but it literally translates the problem exactly: class Dog def speak woof end end def woof if @dog_generic == nil puts "@dog_generic isn't scoped when .woof is called from a class method!\n" else puts "@dog_generic is scoped when .woof is called from the global scope. See:\n" + @dog_generic end end @dog_generic = "Woof!" lassie = Dog.new lassie.speak #=> @dog_generic isn't scoped when .woof is called from an instance method!\n woof #=> @dog_generic is scoped when .woof is called from the global scope. See:\nWoof! TL/DR: I need lassie.speak to return this string: "@dog_generic is scoped when .woof is called from the global scope. See:\nWoof!" @dog_generic must remain as an insance variable. The use of Globals or Constants is not acceptable. Could woof inherit from the Global scope? Maybe some sort of keyword: def woof < global # This 'code' is just to conceptualise what I want to do, don't take offence! end Is there some way the .woof method could 'pull in' @dog_generic from the global scope? Will @dog_generic have to be passed in as a parameter?

    Read the article

1 2 3  | Next Page >