Opened 12 years ago
Closed 12 years ago
#9663 closed bug (fixed)
BRefFilter not Filtering
Reported by: | scanty | Owned by: | anevilyak |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Kits/libtracker.so | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
Hello all. I am trying to use a BRefFilter in a BFilePanel, open mode. For whatever reason, Filter() is not being invoked, so the files displayed by the panel are never filtered, and simply pass right through the BRefFilter as if it wasn't there. I have attached a file so you can see what I am doing (wrong?). I know this code worked in BeOS 5, if that matters at all.
Attachments (1)
Change History (8)
by , 12 years ago
Attachment: | ROMFilePanel.h added |
---|
comment:1 by , 12 years ago
The filter class itself looks ok. Without seeing how you're attaching it however, it's not possible to tell where you might be going wrong here. A simple test as follows invokes the filter correctly here though, which would seem to indicate that your problem is not the filter itself, but attaching it to the panel:
#include <Application.h> #include <FilePanel.h> #include <stdio.h> #include "RomPanel.h" int main(int, char **) { BApplication app("application/x-vnd.blah-filepaneltest"); BFilePanel* panel = new BFilePanel(B_OPEN_PANEL); panel->SetRefFilter(new ROMFilter()); panel->Show(); app.Run(); return B_OK; }
follow-up: 3 comment:2 by , 12 years ago
Component: | - General → Kits/libtracker.so |
---|---|
Version: | R1/alpha4.1 → R1/Development |
comment:3 by , 12 years ago
This is how I am adding it
ROMFilePanel::ROMFilePanel () : BFilePanel (B_OPEN_PANEL, NULL, NULL, 0, false, NULL, NULL, true, true) { Window()->Lock(); SetRefFilter (new ROMFilter()); // FIXME: hack. //SetPanelDirectory ("/void/roms/nes"); //SetPanelDirectory ("/the dump/roms/nes"); //fTempCart = new NESCart; Customize(); Window()->Unlock(); }
comment:4 by , 12 years ago
The above test works over here as well, so I'm not sure what to tell you. As a side note, you don't need the window locks there since the panel is constructed with the looper locked, and isn't unlocked until the panel is first shown.
comment:5 by , 12 years ago
Aha....it appears to work only on the initial folder the panel shows, but doesn't seem to get invoked on folder switching...looking into that.
comment:6 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → in-progress |
ROMFilePanel with BRefFilter inline